好看的设计网站,wordpress和织梦哪个好,云南网站建设公司排名,石家庄电力设计公司今天在修改前端页面的时候#xff0c;页面报错了#xff0c;提示了这个信息 Uncaught SyntaxError: string literal contains an unescaped line break 问题指向这行代码#xff0c;这就是通过JS渲染一个easyui的搜索框#xff0c;仔细确认之后#xff0c;发现没有任何问…今天在修改前端页面的时候页面报错了提示了这个信息 Uncaught SyntaxError: string literal contains an unescaped line break 问题指向这行代码这就是通过JS渲染一个easyui的搜索框仔细确认之后发现没有任何问题
$(document).ready(function() {$(#searchbar).searchbox({prompt: 请输入称谓名称,width: 200,menu: #menu,searcher: function(value, name) {$(#chengwei_list).datagrid(load, {permanent: name,name: value});}});});
那么问题很有可能就出在页面上了查看页面的代码发现是复制的时候漏掉了个单引号
!DOCTYPE html
htmlheadmeta charsetutf-8 /link relstylesheet href/css/themes/icon.css/link relstylesheet href/css/themes/default/easyui.css /link relstylesheet href/css/public.css/title角色账号管理称谓列表/titlescript src/js/public/jquery.min.js/scriptscript src/js/easyui/jquery.easyui.min.js/scriptscript src/js/easyui/easyui-lang-zh_CN.js/scriptscript src/js/public/util.js/scriptscript src/js/public/public.js/scriptscript src/js/achievement/chengwei_list.js/script/headbodyform idsearch_formtabletrtdinput idsearchbar //td/tr/table/formdiv idmenu stylewidth:120px;div data-optionsname:0,iconCls:icon-ok限时称谓/divdiv data-optionsname:1,iconCls:icon-ok永久称谓/div/div/body
/html
就在这里 div idmenu stylewidth:120px; div data-optionsname:0,iconCls:icon-ok限时称谓/div div data-optionsname:1,iconCls:icon-ok永久称谓/div//这行的icon-ok后面少了个单引号 /div 添加单引号之后页面恢复正常 好了这篇文章就分享到这里了如果文章内容对你有所帮助不要忘了点赞收藏哦~