复制代码 代码如下:
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;
}
}
时间: 2024-09-27 23:53:38