0
我的javascript代码:的Javascript的ReferenceError:无效转让左侧
$(function(){
function replace(code){
var textbox = $("textbox[name=textbox]");
var len = $(textbox).val().length;
var start = $(textbox)[0].selectionStart;
var end = $(textbox)[0].selectionEnd;
var sel = $(textbox).val().substring(start, end);
var replace = '['+code+']' + sel + '[/'+code+']';
$(textbox).val($(textbox).val().substring(0,start)
+ replace + $(textbox).val().substring(end,len);
);
}
});
这萤火虫错误:
的ReferenceError:无效转让左侧 $(文本).VAL()= $(文本).VAL()子(0,开始)+取代+
工作以这样的方式。 $(文本).VAL($(文本).VAL()子(0,开始)+取代+ $(文本).VAL()子(结束,LEN。 )// < - - 这里是 ); 谢谢kennypu –