admin 管理员组文章数量: 1086019
错误:函数里面装字符串,无法获取函数里面的参数值,报错如下
Uncaught SyntaxError: identifier starts immediately after numeric literal
起因:在jsp页面定义点击函数时,无法获取函数里面字符串的参数值。
解决办法:
在参数两边加一个单引号
''
错误代码:
onclick="editType(${p.id})"
正确代码:
onclick="editType('${p.id}')"
本文标签: identifier SyntaxError uncaught starts literal
版权声明:本文标题:Uncaught SyntaxError: identifier starts immediately after numeric literal 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1738235717a1948197.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论