在服务器端request(“参数”)判断后response.end()可行?

解决方案 »

  1.   

    可以控制是否加载;
    给你个例子;条件判断自己写吧
    <html> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
    <title>测试一下</title> 
    </head> 
    <body> 
    下面的表格内容就是不出来.
    <script language="javascript"> 
    mystop();function mystop(){ 
      document.execCommand("stop")} 
     
    </script> <table width="90%" border="1" cellspacing="0" cellpadding="0"> 
      <tr> 
        <td>111</td> 
        <td>222</td> 
      </tr> 
      <tr> 
        <td>333</td> 
        <td>444</td> 
      </tr> 
      <tr> 
        <td>555</td> 
        <td>666</td> 
      </tr> 
      <tr> 
        <td>777</td> 
        <td>888</td> 
      </tr> 
    </table> 
    </body> 
    </html>
      

  2.   

    当然,要做到浏览器兼容,还要在mystop函数里做些额外的判断;类似
    if(!window.attachEvent)之类的.... 
      

  3.   

    把 table 放在 DIV里
    <DIV id="divTable">
    <table   width="100%"   height="70"     border="0"   cellpadding="0"   cellspacing="0">
        <tr>
    <td   height="7"> 表格是正常显示 </td>
        </tr>
        </table> </DIV>用个JavaScript 函数,判断 隐藏 该 DIV ,应该可以。
      

  4.   

    页面是.shtml 的不与服务器做通信,只能在客户端来判断。3楼的方法可以实现需求,多谢提供方法。只是在源代码里还能看到table。5楼的方法已经想到了,因为不想用此方法才开此贴的,还是要谢谢各位给与帮助,就此结贴。