页面传值的javascript

页面传值的javascript

关键字:   页面传值的javascript    

<form name='form2' enctype='multipart/form-data' action='htmlfile.jsp' method='post'>

上传
</form>

 

 

提交到页面:

<form name='form1' action='insert_image.jsp' method='post'>
<%
       String virtual = "/forum/images/";
           request.setCharacterEncoding("GBK");
           ForumUploadUtil upload = new ForumUploadUtil(pageContext.getServletContext());
           String path = upload.uploadFile(request);
          
          
           String strTemp[] = path.split("/");
     String fileName  = strTemp[strTemp.length-1];
    
     path = virtual + fileName; 
           System.out.println("论坛回贴上传图片path========"+path);          
          
           System.out.println("论坛回贴上传图片成功!");

           if(path.equals("") || path==null){
             out.println("上传文件失败,请检查文件类型及大小!");
           }
          
%>
 
  
<script>
    alert("上传成功!");    
opener.window.document.all.txtFileName.value=document.all.txtFileName.value;
    
    alert(opener.window.document.all.linkFileName.value);
    
        window.close();    
</script>
   
</form>

 

你可能感兴趣的:(页面传值的javascript)