左面要一个下拉列表,3个选项aa bb cc ,然后一个<input type=text>输入框选择aa的时候 输入框中显示:优秀的选择bb的时候 输入框中显示:良好的选择cc的时候 l输入框中显示:及格的并且要求鼠标点击到输入框上,里面的字清空..
谢谢大家啦!!!

解决方案 »

  1.   

    <form><select onchange="this.form.b.value=this.value">
    <option value="优秀的">aa
    ..
    </select>
    <input name=b onfocus='this.value=""'>
    </form>
      

  2.   

    <form> <select onchange="this.form.b.value=this.value">
    <option value="优秀的">aa
    <option value="良好的">bb
    <option value="及格的">cc
    </select>
    <input name=b onfocus='this.value=""'>
    </form>
      

  3.   

    <select id="sel1" onchange="showselect();">
        <option value='优秀的' selected>aa</option>
        <option value='良好的' >bb</option>
        <option value='及格的' >cc</option>
    </select>
    <input id="txt" type="text" size="10" value="" />
    <script type="text/javascript">
        function showselect(t)
        {
            var obj=document.getElementById("sel1");
            var txt=document.getElementById("txt");
            txt.value=obj.options[obj.selectedIndex].text;
        }
        document.getElementById("txt").onclick=function(){
            this.value="";
        };
    </script>
      

  4.   

    <select id="sel1" onchange="showselect();">
        <option value='优秀的' selected>aa</option>
        <option value='良好的' >bb</option>
        <option value='及格的' >cc</option>
    </select>
    <input id="txt" type="text" size="10" value="" />
    <script type="text/javascript">
        function showselect(t)
        {
            var obj=document.getElementById("sel1");
            var txt=document.getElementById("txt");
            txt.value=obj.options[obj.selectedIndex].value;
        }
        document.getElementById("txt").onclick=function(){
            this.value="";
        };
    </script>
      

  5.   

    是这样的,这个下拉菜单,要求是用一个控件实现的,为了美观。代码如下:<combobox id="Type" width="85" frameWidth="83" labelposition="top" columns="1" groupClass="group" itemClass="item" itemOverClass="itemOver" itemSelectedClass="itemFocus"  value="0">
    <tip position="frameTop">
    <div style="padding: 1px; width: 81px;"><table cellspacing="0" cellpadding="4" border="0" id="Type_Items" style="background-color: rgb(255, 255, 255); cursor: default; width: 79px;"><tbody><tr><td index="0,0" class="undefined" normalclass="undefined" overclass="undefined" selectedclass="undefined"/></tr><tr><td index="0,1" class="item" normalclass="item" overclass="itemOver" selectedclass="itemFocus">优秀的</td></tr><tr><td index="0,2" class="item" normalclass="item" overclass="itemOver" selectedclass="itemFocus">良好的</td></tr><tr><td index="0,3" class="item" normalclass="item" overclass="itemOver" selectedclass="itemFocus">及格的</td></tr></tbody></table></div>
    </tip>
    </combobox>
      

  6.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
    <HTML> 
    <HEAD> 
    <TITLE> New Document </TITLE> 
    <style> 
    body,td,div,input{font-weight:normal; font-size:11px; font-family:verdana; color:#000000;}
    </style> 
    </HEAD> 
    <script language="javascript" type="text/javascript">
    function chan(obj)
    {
    var v=obj.options[obj.options.selectedIndex].value;
    var inbox=document.getElementById("txt");
    if(v=="aa")
    inbox.value="优秀的";
    else if(v=="bb")
    inbox.value="良好的";
    else
    inbox.value="及格的";
    }
    </script>

    <BODY> 
    <select id="select01" name="select01" onChange="javascript:chan(this);">
      <option value="aa">aa</option>
      <option value="bb">bb</option>
      <option value="cc" selected>cc</option>
    </select>
    <p>
    <input id="txt" name="txt" type="text" onClick="javascript:this.value='';">
    </p>
    </BODY> 
    </HTML> 
      

  7.   

    改控件的一般不了解。你直接在相应DOM上加onclick等事件(代码)就行了
      

  8.   

    是这样的,这个下拉菜单,要求是用一个控件实现的,为了美观。代码如下: <combobox id="Type" width="85" frameWidth="83" labelposition="top" columns="1" groupClass="group" itemClass="item" itemOverClass="itemOver" itemSelectedClass="itemFocus"  value="0"> 
    <tip position="frameTop"> 
    <div style="padding: 1px; width: 81px;"> <table cellspacing="0" cellpadding="4" border="0" id="Type_Items" style="background-color: rgb(255, 255, 255); cursor: default; width: 79px;"> <tbody> <tr> <td index="0,0" class="undefined" normalclass="undefined" overclass="undefined" selectedclass="undefined"/> </tr> <tr> <td index="0,1" class="item" normalclass="item" overclass="itemOver" selectedclass="itemFocus">优秀的 </td> </tr> <tr> <td index="0,2" class="item" normalclass="item" overclass="itemOver" selectedclass="itemFocus">良好的 </td> </tr> <tr> <td index="0,3" class="item" normalclass="item" overclass="itemOver" selectedclass="itemFocus">及格的 </td> </tr> </tbody> </table> </div> 
    </tip> 
    </combobox>
      

  9.   


    <select name="sel" onchange="setValue(this);">
    <option value="0">--choose--</option>
    <option value="aa">aa</option>
    <option value="bb">bb</option>
    <option value="cc">cc</option>
    </select>
    <input type="text" name="tex" id ='cont' onfocus="this.value=''">
    function setValue(obj){
    //alert(obj.value);
    var textObj = document.getElementById('cont');
    if(obj.value == 'aa'){
    textObj.value='优秀';
    }
    if(obj.value == 'bb'){
    textObj.value='良好';
    }
    if(obj.value == 'cc'){
    textObj.value='及格';
    }
    if(obj.value == '0'){
    textObj.value='';
    }
    }
      

  10.   

    我是楼主~!!是这样的,这个下拉菜单,要求是用一个控件实现的,为了美观。代码如下: <combobox id="Type" width="85" frameWidth="83" labelposition="top" columns="1" groupClass="group" itemClass="item" itemOverClass="itemOver" itemSelectedClass="itemFocus"  value="0"> 
    <tip position="frameTop"> 
    <div style="padding: 1px; width: 81px;"> <table cellspacing="0" cellpadding="4" border="0" id="Type_Items" style="background-color: rgb(255, 255, 255); cursor: default; width: 79px;"> <tbody> <tr> <td index="0,0" class="undefined" normalclass="undefined" overclass="undefined" selectedclass="undefined"/> </tr> <tr> <td index="0,1" class="item" normalclass="item" overclass="itemOver" selectedclass="itemFocus">优秀的 </td> </tr> <tr> <td index="0,2" class="item" normalclass="item" overclass="itemOver" selectedclass="itemFocus">良好的 </td> </tr> <tr> <td index="0,3" class="item" normalclass="item" overclass="itemOver" selectedclass="itemFocus">及格的 </td> </tr> </tbody> </table> </div> 
    </tip> 
    </combobox>
      

  11.   

    你用的控件我们没用过,因此只能说个思路不可能帮你写对代码。<td index="0,3" class="item" normalclass="item" overclass="itemOver" selectedclass="itemFocus">及格的 </td>这类类型的DOM上面加上onclick的事件
    比如用Jquery找类似DOM并写入函数$("td[index='0,3']").click( function(){
       document.formName.inputText.value = $(this).text();
    });
      

  12.   

    if(document.comboBoxes["Type"].hiddenField.value == '优秀的')这个属性是可以用的,就是不知道再往下要怎么写了....