JS错误笔记

来源:互联网 发布:欧母龙plc编程软件 编辑:程序博客网 时间:2024/05/17 21:50

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>';}


0 0
原创粉丝点击