怎讓textbox隱藏,謝謝

解决方案 »

  1.   

    OnLoad時讓textbox隱藏,之後怎樣將textbox顯示出來,謝謝
      

  2.   

    <form name="foo">
    <input type="text" name="f1" style="display:none" />
    </form>
    <a href="#" onclick="showF1(); return false;">显示</a>
    <script>
    function showF1() {
    document.foo.f1.style="display:inline";
    }
    </script.
      

  3.   


    <body onload="document.getElementById('hidebox').style.display=''">
    <input type="text" style="display:none" id="hidebox">
    </body>
      

  4.   


    <script language="javascript">
    function hidd()
    {
    document.getElementById("aa").style.display="none";
    }
    function show()
    {
    document.getElementById("aa").style.display="";
    }
    </script>
    <body onload="hidd()"><form id="form1" name="form1" method="post" action="">
      <input type="text" name="aa" id="aa" />
      <input type="button" name="button" id="button" value="按钮" onclick="show()" />
    </form>
    </body>
      

  5.   

    button要送出表單在同一頁,哪aa怎樣顯示出來,謝謝
      

  6.   


    <!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>
    <script language="javascript">
    function hidd()
    {
    document.getElementById("aa").style.display="none";
    }
    function show()
    {
    document.getElementById("aa").style.display="";
    }
    </script><body onload="hidd()"><form id="form1" name="form1" method="post" action="">
      <input type="text" name="aa" id="aa" />
      <input type="submit"name="button" id="button" value="按钮" onclick="show()" />
    </form>
    </body></html>
    OnLoad時讓textbox隱藏,之後怎樣將textbox顯示出來,謝謝
      

  7.   

    submit可以不reload網頁嗎?
    有其他方法解決嗎?
    效果是OnLoad時讓textbox隱藏,之後讓textbox顯示出來是經由按鍵讓它顯示和按鍵可以submit
    謝謝 
      

  8.   

    搂主是不是要这个效果?<script>
    function submitForm() {
    document.form1.submit();
    }function showTextBox() {
    document.form1.textbox.style.display = 'inline';
    document.form1.button.value = 'Submit';
    }function buttonClicked() {
    if ('none' == document.form1.textbox.style.display) {
    showTextBox();
    }
    else {
    submitForm();
    }
    }
    </script><form id="form1" name="form1" method="post" action="test.php">
      <input type="text" name="textbox" id="textbox" style="display:none;"/>
      <input type="button" name="button" id="button" value="Display Textbox" onclick="buttonClicked()" />
    </form>