请问javascript的得到文件的大小的语句怎么写? 谢谢 朋友,在你的电脑里找到JSCRIPT5.CHM,打开,搜索"size". 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><script language=javascript>var num = Math.round(Math.random()*12);alert(num);function getfile(){ var fso,f,s; fso = new ActiveXObject("Scripting.FileSystemObject"); f = fso.GetFile(document.formname.file.value); s = f.Name + " on Drive " + f.Drive + "<br>"; s += "文件建立的日期: " + f.DateCreated + "<br>"; s += "最后打开的时间: " + f.DateLastAccessed + "<br>"; s += "最后修改的时间: " + f.DateLastModified + "<br>"; s += "文件大小: "+f.size +" bytes" + "<br>"; s += "文件属性: "+f.attributes +"<br>"; document.write(s);} </script></head><body><form name=formname action=filesize.htm enctype="multipart/form-data" method="post" ><input name=file type=file><input type="button" name="fileupb" value="送出" onclick="getfile()"></form></body></html> <img src="a.gif" onclick="alert(this.filesize)"><input type="button" value="按钮" onclick="alert(document.filesize)"> 求一个filter讲解,代码贴在里面了。 aptana压缩javascript 闭包里怎么调用对象成员呢??? 急... 修改一个js脚本 这样的JS怎么写. 怎么样用js实现dw里map的功能 求高手,切换按钮tab2的背景怎么保持不再变回去??? 焦点map使用问题,有会的高手,多指教 我有一个table,我想在上面的tr中使用相对定位,下面的tr中用绝对定位,用javascript实现,怎么不行呀! ResultSet在js中循环取值rs.next()遇到问题。 如何用javascript来过滤Listbox中的重复项 这就是传说中的难题???
<head>
<script language=javascript>
var num = Math.round(Math.random()*12);
alert(num);
function getfile(){ var fso,f,s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile(document.formname.file.value);
s = f.Name + " on Drive " + f.Drive + "<br>";
s += "文件建立的日期: " + f.DateCreated + "<br>";
s += "最后打开的时间: " + f.DateLastAccessed + "<br>";
s += "最后修改的时间: " + f.DateLastModified + "<br>";
s += "文件大小: "+f.size +" bytes" + "<br>";
s += "文件属性: "+f.attributes +"<br>";
document.write(s);}
</script>
</head>
<body>
<form name=formname action=filesize.htm enctype="multipart/form-data" method="post" >
<input name=file type=file>
<input type="button" name="fileupb" value="送出" onclick="getfile()">
</form>
</body>
</html>