发布于 2017-01-02 00:58:00 | 125 次阅读 | 评论: 0 | 来源: 网友投递
SWFUpload Flash上传组件
SWFUpload是一个客户端文件上传工具,最初由Vinterwebb.se开发,它通过整合Flash与JavaScript技术为WEB开发者提供了一个具有丰富功能继而超越传统
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 ['<object', classid, ' id="', this.movieName, '" type="application/x-shockwave-flash" data="', (this.support.imageResize ? this.settings.flash_url : this.settings.flash9_url), '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">',
'<param name="wmode" value="', this.settings.button_window_mode, '" />',
'<param name="movie" value="', (this.support.imageResize ? this.settings.flash_url : this.settings.flash9_url), '" />',
'<param name="quality" value="high" />',
'<param name="allowScriptAccess" value="always" />',
'<param name="flashvars" value="' + this.getFlashVars() + '" />',
'</object>'].join("");
};