可以得到,代码如下:
//假如文件控件名称为photo
var filePath=form1.photo.value;
var pos=filePath.lastIndexOf("\\");
var fileName=filePath.substring(pos+1);//文件名
alert(fileName);不知道是不是你的意思
//假如文件控件名称为photo
var filePath=form1.photo.value;
var pos=filePath.lastIndexOf("\\");
var fileName=filePath.substring(pos+1);//文件名
alert(fileName);不知道是不是你的意思
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货