我要实现的效果是, 默认下拉框是  通过,不通过原因不显示  只有我在选择 不通过的时候, 不通过的原因才能显示出来, <body bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"  >
  <TABLE cellSpacing=0 cellPadding=0 width=""  align=center border=0 > 
  <TBODY>
  <tr>
  <td align="right"><font face="宋体" size="2">确认是否通过:</font></td>
<td>
<SELECT size="1" name="ASNSPZT   " ID="SNSPZT" ><option value="F" selected >通过</option>
<option value="G">不通过</option> </SELECT>
</td>
</tr>
<tr><td align="right" ><font face="宋体" size="2">不通过原因:</font></td>
<td colspan="7"><textarea name="LSNQBYY   " cols="35" rows="3" ><RDML MERGE="SNQBYY    "></textarea>
(限制在110个汉字)</td>
  </tr>
  </TBODY>
  </TABLE>
  
  </body>还有一个问题就是 显示器在标屏的时候我让  Table  的width = 950  ,在宽屏 的情况下 width = 100%,谢谢 ,主要是不知道怎么给width赋值  我说的是显示器,不是网页,谢谢<body bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"  >
<TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=0>下面的代码省略~~~~~~~~~~
谢谢高手答复!!!

解决方案 »

  1.   

    L@_@K
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
      <title> new document </title>
      <meta name="generator" content="editplus" />
      <meta name="author" content="" />
      <meta name="keywords" content="" />
      <meta name="description" content="" />
     </head><body bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"  >
    <script type="text/javascript">
    <!--
    alert(1)
    //-->
    </script>
    <TABLE cellSpacing=0 cellPadding=0 width=""  align=center border=0 > 
    <TBODY> 
    <tr> 
    <td align="right"> <font face="宋体" size="2">确认是否通过: </font> </td> 
    <td> 
    <SELECT size="1" id="SNSPZT" > 
    <option value="F" selected >通过 </option> 
    <option value="G">不通过 </option> 
    </SELECT> 
    </td> 
    </tr> 
    <tr id="trNoPassReason" style="display: none;"> 
    <td align="right" > <font face="宋体" size="2">不通过原因: </font> </td> 
    <td colspan="7"> <textarea name="LSNQBYY  " cols="35" rows="3" ></textarea> 
    (限制在110个汉字) </td> 
    </tr> 
    </TBODY> </TABLE> <script type="text/javascript">
    <!--
    alert(2);
    $ = document.getElementById;$("SNSPZT").onchange = function() {
    if (this.value == "G")
    $("trNoPassReason").style.display = "inline";
    else
    $("trNoPassReason").style.display = "none";
    };
    //-->
    </script>
      </body> 
    </html>
      

  2.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head>
    <body bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"  > 
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
        <!-- 这个DIV撑住结构,使得浏览器窗口只有在950宽度以上时才拉伸下面的table -->
    <div style="width:950px; height:1px; visibility:hidden; margin-top:-1px;"></div>
        <table width="100%" border="1" cellspacing="0" cellpadding="0">
          <tr>
            <td>
            <SELECT size="1" name="ASNSPZT  " ID="SNSPZT"> 
                <option value="F" selected >通过 </option> 
                <option value="G">不通过 </option> 
            </SELECT> 
            </td>
            <td>
            </td>
          </tr>
          <tr>
            <td align="right" > <font face="宋体" size="2">不通过原因: </font> </td> 
            <td colspan="7"> <textarea id="LSNQBYY" name="LSNQBYY  " cols="35" rows="3" ></textarea> (限制在110个汉字) </td> 
          </tr> 
        </table>
        </td>
      </tr>
    </table>
      </body> 
    </html>
    <script type="text/javascript">function $(strID){
    return document.getElementById(strID);
    }$("SNSPZT").onchange = function(){
    if(this.value == "G"){
    $("LSNQBYY").value = '<RDML MERGE="SNQBYY    "> '; //这里把字符串替换为你想要显示的内容。
    }else{
    $("LSNQBYY").value = '';
    }
    }</script>
      

  3.   

    撑住结构的DIV换为这个吧:
    <div style="width:950px; height:0px; visibility:hidden;"></div>
      

  4.   

    两个问题都解决了,散分吧L@_@K
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
      <title> new document </title>
      <meta name="generator" content="editplus" />
      <meta name="author" content="" />
      <meta name="keywords" content="" />
      <meta name="description" content="" />
     </head><body bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"  ><TABLE cellSpacing=0 cellPadding=0 id="tbeConfirm" align=center border=1 > 
    <TBODY> 
    <tr> 
    <td align="right" width="30%">
    <font face="宋体" size="2">确认是否通过: </font></td> 
    <td width="70%"> 
    <SELECT size="1" id="SNSPZT" > 
    <option value="F" selected >通过 </option> 
    <option value="G">不通过 </option> 
    </SELECT> 
    </td> 
    </tr> 
    <tr id="trNoPassReason" style="display: none;"> 
    <td align="right" > <font face="宋体" size="2">不通过原因: </font> </td> 
    <td colspan="7"> <textarea name="LSNQBYY  " cols="35" rows="3" ></textarea> 
    (限制在110个汉字) </td> 
    </tr> 
    </TBODY> </TABLE> <script type="text/javascript">
    <!--
    $ = document.getElementById;$("SNSPZT").onchange = function() {
    if (this.value == "G")
    $("trNoPassReason").style.display = "inline";
    else
    $("trNoPassReason").style.display = "none";
    };// 宽屏时 1280/800 即 1.6 
    if((window.screen.width/window.screen.height)==1.6)
    $("tbeConfirm").style.width = "100%";
    else
    $("tbeConfirm").style.width = "950px"; //-->
    </script>
      </body> 
    </html>