window.location.href = "abc.asp?len="+ tabid.rows.length;

解决方案 »

  1.   

    同意楼上的,<%%>里面的所有代码在网页开始执行时就运行的,当网页打开完后所有的网页实际就是静的了,要取javascript的值必须网页提交(也就是提交后才运行<%%>里的代码)!
      

  2.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language=javascript>
    function showRowLenth(){
    s=tb.rows.length
    return (s)
    }
    </script>
    </head>
    <body>
    <table id="tb">
    <tr>
    <td>as</td>
    </tr>
    <tr>
    <td>da</td>
    </tr>
    </table>
    <script language=vbs>
    alert(showRowLenth())
    </script>
    </body>
    </html>