Home > Web Front-end > JS Tutorial > Solution to SwfUpload upload button not appearing on IE10_javascript skills

Solution to SwfUpload upload button not appearing on IE10_javascript skills

WBOY
Release: 2016-05-16 17:31:19
Original
1370 people have browsed it

During the system testing, it was found that the refresh-free upload function implemented using SwfUpload could not be used on IE10. Doesn't SwfUpload support it? Or does it need to be implemented in another way? Finally, by understanding the SwfUplad.JS file, we found that we can modify it to support IE10. The specific solution is as follows:

Open SwfUpload.js and find it in the js file // Private: getFlashHTML generates the object tag needed to embed the flash in to the document" and "//Private: getFlashVars builds the parameter string that will be passed" and this line, and then replace the middle with the following code and it will be OK

Copy code The code is as follows:

SWFUpload.prototype.getFlashHTML = function (flashVersion) {
// Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
var classid = "";
var Sys = {};
var ua = navigator.userAgent.toLowerCase();
if (window.ActiveXObject) {
Sys.ie = ua.match(/msie ([d.] )/)[1];
if (Sys.ie && Sys.ie.substring( 0, 1) == "9" || Sys.ie.substring(0, 2) == "10") {
classid = ' classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"' ;
}
}
return ['',
'',
'',
''',
'''].join("");
};

Save and run to see the effect, perfect!
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template