拦截表单的另外一种写法

 1<script language="vbs">   
 2sub send_onclick   
 3dim f   
 4set f=document.ff   
 5photo=trim(f.photo.value)   
 6if photo="" then   
 7msgbox "没有照片,怎么传! ",64 ,"上传"   
 8f.photo.focus   
 9exit sub   
10end if   
11f.submit   
12end sub   
13sub retu_onclick   
14history.back   
15end sub   
16</script>
1<form action="saveedit.asp" enctype="multipart/form-data" method="POST" name="ff">
2<input name="photo" type="file"/>
3<input name="send" type="button" value="开始上传"/>
4</form>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus