请问如何把一个html文本框控件隐藏,注意只是一般的html控件,没有run at server
谢谢!

解决方案 »

  1.   

    <input type="button" value="Test" style="display:none">
      

  2.   

    <input type="text" value="Test" style="display:none">
      

  3.   

    可以用js实现:这是以前写的里面的一小部分,,关键是指定html控件的disabled设置成false为不显示,true为显示;
     
    function ChangeMessageOption() {

    UserInput1.disabled = true;
    UserInput1.style.display = 'none';
    UserInput2.style.display = 'inline';
    UserInput2.style.visibility = 'visible';
    UserInput2.disabled = false;
    UserInput2.focus();
    CurrentInput = 0;
    }
      

  4.   

    <input type="hidden" value="Test">
      

  5.   

    <input type="text" value="Test" style="display:none">