我试图为openwrt制作我的on模块。我为luci制作了简单的页面,现在需要使用jQuery。所以我再加上
<script type="text/javascript" src="/resources/jquery-2.1.1.min.js"></script>我的htm文件。但是浏览器为jquery-2.1.1.min.js返回一个404。
如何在luci中添加jquery-2.1.1.min.js?
发布于 2015-04-10 14:07:46
在路由器中下载jQuery-2.1.min.js,并在设备的web目录中的适当位置下载jQuery-2.1.min.js。
$ cd /www/luci-static/resources
$ wget http://code.jquery.com/jquery-2.1.1.min.js将下载的JQuery源代码包括在您的HTML文件中,如下所示:
<script type="text/javascript" src="/luci-static/resources/jquery-2.1.1.min.js"></script>那应该就行了!
https://stackoverflow.com/questions/26998745
复制相似问题