用hack\9直接写ie8的样式html
用prototype新写了方法html5
if (!Array.prototype.indexOf){
Array.prototype.indexOf = function(elt){
var len = this.length || 0
var from = Number(arguments[1]) || 0
from = (from < 0) ? Math.ceil(from) : Math.floor(from)
if (from < 0) from += len
for (; from < len; from++) {
if (from in this && this[from] === elt) {
return from
}
}
return -1
}
}
if (!String.prototype.trim){
String.prototype.trim = function(elt){
return $.trim(this)
}
}
复制代码
<meta http-equiv="X-UA-Compatible" content="IE=edge">
复制代码
var uploader = WebUploader.create({
auto: true,// 选完文件后,是否自动上传。
// swf文件路径
swf: '../../js/plugin/webuploader/Uploader.swf',
paste: document.body,
// 文件接收服务端。
server: serverUrl+"files/upload",
formData:postData,
...
复制代码
提及来很简单啊,可是实践的时候一条条办法也是很辛苦的啦nginx