图片上传前取得尺寸
类别: JavaScript教程
我也来写一段上传图片前的代码供大家参考一下
我也不详细的说明啦,不过我想出这代码还要谢谢 独孤求爱 写的那文章
<html>
<head>
<script language="vbscript">
sub thisform_onSubmit
me.action = "uppic.asp?picw="&me.zt.width&"&pich="&me.zt.height
end sub
</script>
</head>
<body>
<form method="POST" name="thisform" action="" enctype="multipart/form-data">
<p><input type="file" name="F1" size="20" onChange="show()"></p>
<p><input type="submit" value="提交" name="B1" style="display:none">
</p>
<img src="" id="zt" style="visibility:hidden" onLoad="oksubmit()">
<script language="JavaScript">
function show()
{document.all.zt.src=document.thisform.F1.value;}
function oksubmit()
{thisform.B1.style.display = "";}</script>
</form></body></html>
我也不详细的说明啦,不过我想出这代码还要谢谢 独孤求爱 写的那文章
<html>
<head>
<script language="vbscript">
sub thisform_onSubmit
me.action = "uppic.asp?picw="&me.zt.width&"&pich="&me.zt.height
end sub
</script>
</head>
<body>
<form method="POST" name="thisform" action="" enctype="multipart/form-data">
<p><input type="file" name="F1" size="20" onChange="show()"></p>
<p><input type="submit" value="提交" name="B1" style="display:none">
</p>
<img src="" id="zt" style="visibility:hidden" onLoad="oksubmit()">
<script language="JavaScript">
function show()
{document.all.zt.src=document.thisform.F1.value;}
function oksubmit()
{thisform.B1.style.display = "";}</script>
</form></body></html>
- 上一篇: 如何获得ASP页面的载入时间
- 下一篇: 自动关闭窗口,方法总结
-= 资 源 教 程 =-
文 章 搜 索