判断是否已引用js,如果没有会引发异常,在异常时添加引用
try { if (layui) {} } catch (ex) { var s = document.createElement('script'); s.src = '/Content/Layui/layui.js'; document.head.appendChild(s); }
判断是否已引用js,如果没有会引发异常,在异常时添加引用
try { if (layui) {} } catch (ex) { var s = document.createElement('script'); s.src = '/Content/Layui/layui.js'; document.head.appendChild(s); }
转载于:https://www.cnblogs.com/xiaonangua/p/9887867.html

被折叠的 条评论
为什么被折叠?