uppics.asp 
<% 
dim id 
id=request("id") 
document.form1.file.value=id'文本域可以给他它一值吗,我有另一张页面通过判断value有没有值,来判断是否上传图片了 
if document.form1.file.value="" then 
response.write("<script>alert('还没上传图片')</script>") 
else 
response.write("<script>alert('已上传图片')</script>") 
end if 
%> 
<html> 
<head><title>test</title></head> 
<body> 
<form id="form1" name="form1" enctype="multipart/form-data" method="post" action="check.asp"> 
<label></label> 
<label> 
<input type="file" name="file" /> 
</label> 
<input type="submit" name="Submit" value="提交" /> 
</form> 
</body> 
</html> 
-------------------- 
check.asp 
<html> 
<head> 
<title></title> 
</head> 
<body> 
<script> 
alert('check完毕');window.location='uppics.asp?id=1' 
</script> 
</body> 
</html> 
--------------- 
我想实现的是:在uppics上传图片点提示时,转到check.asp去核实(我省略了check的代码),核实正确后加了一个ID=1传给uppics.asp,uppics.asp把获取到的ID传给file.value,然后再判断file.value的值是不是为空,如果不为空了,就提示已上传了图片。 
------希望有人帮我解决问题,先谢谢各位来回答的人————— 
问题补充:这个程序是错的,了解的人帮忙修改一下,或是有更好的办法,只要能实现此功能就可以。

解决方案 »

  1.   

    <%@LANGUAGE="VBSCRIPT"%><html>  
    <head> <title> test </title> </head>  
    <body>  
    <form   id="form1"   name="form1"   enctype="multipart/form-data"   method="post"   action="check.asp">  
    <label> </label>  
    <label>  
    <input   type="file"   name="file"   />  
    </label>  
    <input   type="submit"   name="Submit"   value="提交"   />  
    </form>  
    <%  
    dim   id  
    id=request("id")  
    'document.form1.file.value=id'文本域可以给他它一值吗,我有另一张页面通过判断value有没有值,来判断是否上传图片了  
    'if   document.form1.file.value=""   then  
    if id<>"1" then
    response.write(" <script> alert('还没上传图片') </script> ")  
    else  
    response.write(" <script> alert('已上传图片') </script> ")  
    end   if  
    %>  
    </body>  
    </html>   check.asp中<%@LANGUAGE="VBSCRIPT"%>
    <% response.redirect "uppics.asp?id=1" %>
      

  2.   

    谢谢一楼的回答,这样确实可以成功运行,但这样就有一个功能没办法实现,也就是'document.form1.file.value=id'这句,我是想在收到ID以后并给file.value赋值,因为我有另一张页面在对file.value进行check是否为空,如果为空证明还没上传图片。能帮我看看嘛,谢谢!
      

  3.   

    <%@LANGUAGE="VBSCRIPT"%><html>  
    <head> <title> test </title> </head>  
    <body>  
    <form   id="form1"   name="form1"   enctype="multipart/form-data"   method="post"   action="check.asp">  
    <label> </label>  <label>
    <%  
    dim   id  
    id=request("id")  
    'document.form1.file.value=id'文本域可以给他它一值吗,我有另一张页面通过判断value有没有值,来判断是否上传图片了  
    'if   document.form1.file.value=""   then  
    if id<>"1" then
      
    response.write("<input   type="file"   name="file" value=0 />")  
     
    response.write(" <script> alert('还没上传图片') </script> ")  
    else  
    response.write("<input   type="file"   name="file" value=1 />")  
    response.write(" <script> alert('已上传图片') </script> ")  
    end   if  
    %>  
    </label> 
    <input   type="submit"   name="Submit"   value="提交"   />  
    </form>  
    </body>  
    </html>