function validateFileSize(id
var btnsave = document
btnsave
var filepath = "";
var fileupload = document
if (fileupload
var agent = window
if (document
var isIE
var isIE
//IE
if (isIE
fileupload
filepath = document
}
//IE
else
{ filepath = file
//PageMethods
alert(filepath);
}
if (agent
alert("FF");
alert(getValue());
return false;
if (fileupload
var size = fileupload
if (size > parseInt(maxsize)) {
fileupload
alert("文件超過大小!");
}
else { alert("文件上傳成功!"); }
}
}
}
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20580.html