
前端问题&解决方案
jumptigerfu
这里介绍不了我
展开
-
javascript使用字符串作为参数报错的问题
原因:因为直接字符串作为参数需要加单引号,不然就判定为为定义的参数 function option(value, row, index) { var htm = ""; htm += '<button id="dupdevice" deviceId="' + value +'" onclick="updDevice(' + value + ')">导入</button>' return htm; } 解决方案:onclick里面加入转义字原创 2022-05-17 00:54:49 · 659 阅读 · 0 评论 -
使用layer时报错“layer.open is not a function”解决方案
查询了资料 发现layer是要依赖jQuery的情况下才能运行 所以 解决方案: 把layer的声明放在JQuery的声明之后 将: ##这里是Layer的声明 <script type="text/javascript" src="../static/js/plugins/layer/layer.min.js"></script> ##这里是jquery的声明 <script src="../static/js/jquery.min.js?v=2.1.4"原创 2022-04-12 00:21:58 · 3718 阅读 · 0 评论