限制上传文件为jpg文件
function checkPhoto(fnUpload)
{
var filename = fnUpload.value;
alert(filename);
var mime = filename.toLowerCase().substr(filename.lastIndexOf("."));
if(mime!=".jpg")
{
alert("请选择jpg格式的照片上传");
fnUpload.outerHTML=fnUpload.outerHTML;
}
}