您的位置:首页 > Web前端 > JavaScript

JS错误笔记

2015-10-28 16:26 525 查看
1.Uncaught SyntaxError: missing ) after argument list

错误代码:

<pre style="color: rgb(216, 216, 216); font-size: 10.5pt; font-family: 宋体; background-color: rgb(30, 30, 30);"><span style="color: rgb(255, 255, 255);">render</span>: <span style="color: rgb(255, 255, 255);"><strong>function </strong></span>(<span style="color: rgb(191, 164, 164);">rowdata</span>, <span style="color: rgb(191, 164, 164);">rowindex</span>, <span style="color: rgb(191, 164, 164);">value</span>, <span style="color: rgb(191, 164, 164);">column</span>) {
<span style="color: rgb(255, 255, 255);"><strong>return </strong></span><span style="color: rgb(255, 198, 0);">'<a onclick=onDetail(' </span>+ <span style="color: rgb(191, 164, 164);">rowdata</span>.<span style="color: rgb(190, 214, 255);">id </span>+ <span style="color: rgb(255, 198, 0);">',' </span>+ <span style="color: rgb(191, 164, 164);">rowindex </span>+ <span style="color: rgb(255, 198, 0);">');>' </span>+ <span style="color: rgb(191, 164, 164);">rowdata</span>.<span style="color: rgb(190, 214, 255);">code </span>+ <span style="color: rgb(255, 198, 0);">'</a>'</span>;
}




正确代码:

render: function (rowdata, rowindex, value, column) {
return '<a onclick=onDetail("' + rowdata.id + '","' + rowindex + '");>' + rowdata.code + '</a>';
}


                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  javascript