是  value  -----
不是 document.subform.tcode.vaule 中的 vaule

解决方案 »

  1.   

    正确的应该是<html>
    <head>
    <title></title>
    <meta http-equiv="expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="No-cache">
    <meta http-equiv="Cache-Control" content="no-store">
    <meta http-equiv="Content-Type" content="text/html;" charset="gb2312">
    <LINK REL="stylesheet" TYPE="text/css" HREF="../pub/main.css">
    <script language="JavaScript">
    function cancel(orderid,tcode,canceltype,ber,ordername,packid)
    {
    if(canceltype=="1")
    {
    document.subform.phoneNum.value = '12345678' ;
    document.subform.tcode.value = tcode ;
    document.subform.orderid.value = orderid ;
    document.subform.ber.value = ber ;
    document.subform.ordername.value = ordername ;
    document.subform.action = 'test2.jsp' ;
    }
    document.subform.submit();
    }</script>
    </head>
    <body background="../img/common/line.gif" >
    <table  cellSpacing="0" cellPadding="0" align="center" border="0">
    <form name="subform" method="get">
      <tr>
      <input type="hidden" name="phoneNum" >
      <input type="hidden" name="tcode" >
      <input type="hidden" name="orderid" >  <input type="hidden" name="ber" >
      <input type="hidden" name="ordername" >   <tr align="center" valign="top">
        <td colspan="2" align="center"  nowrap>内容:
          <textarea name="operatelog" cols="80" rows="3"></textarea></td>
       </tr></form>
    </table>
    <img src="../../img/common/blank.gif" height="25" width="1">
    <table  cellSpacing=0 cellPadding=0 align=center border=0 >
    <tr class=back_color_5>
        <input type="button" value="按钮" name="button1" onclick="cancel(9,1,1,123,'信息',0)">
        </td>
      </tr>
    </table>
    </body>
    </html>