function  deal()  
    {  
     var K1=form.file.value;  
    //或者 var K1=document.getElementByName("attachement").value;
      }  

解决方案 »

  1.   

    还是取不到啊,难道Script要放在input hidden的下面?
      

  2.   

          function  deal()  
        {  
          K1=form.file.value;  
          }  
      </script>  修改为: 
          function  deal() {  
          form.filepath.value=form.attachement.value;  
     //     alert(form.filepath.value);
          }  
     
      

  3.   

    <form name="form" method="post"  action="${pageContext.request.contextPath }/SendAction.do"> <script  language="javascript">  
    function  deal() {  
    document.form.filepath.value=document.form.attachement.value;  
    document.form.filepath2.value=document.form.attachement.value;  
    }  
    </script>  <input type="file" name="attachement" onchange="deal()" size="20" style="font-family: 微软简魏碑; font-size: 10pt; color: #0000FF; font-weight: bold"> </p> 
    <input type="hidden" name="filepath" size="20" value=K1>
    <!--------------hidden中的效果----------------->
    <input type="text" name="filepath2" size="20" value=K1>
    </form>