[英]How to get all the js and css dependencies from a web page?
I am using the JQuery File Upload plugin and had issues using it from IE 9.x then I found out that this was a known issue and checked out again their example that works on IE 9.x no problems. 我使用的是JQuery File Upload插件,并且在IE 9.x中使用它时遇到了问题,然后我发现这是一个已知问题,并再次检查了在IE 9.x上运行的示例没有问题。 However, in my project if I manually download dependency by dependency I can't get it to work in IE 9.x exactly as in the online File Upload example.
但是,在我的项目中,如果我按依赖关系手动下载依赖项,则无法像在在线文件上传示例中一样,使其在IE 9.x中正常工作。 Therefore this question, how can I get all the css and js dependencies on that Web Page so I can reproduce the same working solution for IE 9.x.
因此,这个问题就是如何获取该网页上的所有css和js依赖关系,以便为IE 9.x复制相同的工作解决方案。 It is actually a very tricky business because changing js library version between related dependencies can lead to broken functionality.
这实际上是一件非常棘手的事情,因为在相关依赖项之间更改js库版本可能会导致功能中断。
For browsers under IE9 capabilities you can try the following plugin : 对于具有IE9功能的浏览器,您可以尝试以下插件:
https://github.com/LPology/Simple-Ajax-Uploader https://github.com/LPology/Simple-Ajax-Uploader
It works IE7+ .. so it's wow. 它可以在IE7 +上运行..
Your code might look like this : 您的代码可能如下所示:
var uploader = new ss.SimpleUpload({
button: $('.js-uploadBtn'), // upload button
url: '/uploadhandler', // URL for server-side upload handler
name: 'userfile', // name of the uploaded file
onSubmit: function() {
this.setProgressBar( $('.js-progressBar') ); // beautiful progress bar
},
onComplete: function(file, response) {
// after upload handler
}
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.