<select name="headerName" id="headerName"> <option value="aaaaaaaa" selected>aaaaaaaa</option> <option value="bbbbbbbb">bbbbbbbb</option> <option value="ccccccccc">ccccccccc</option> <option value="dddddddd">dddddddd</option> </select> 请教下如何实现可编辑可下拉选择
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="imagetoolbar" content="no" />
<title> </title>
</head>
<body>
<div style="border:1px solid green;width:118px;height:20px; position:absolute;">
<input type='text' id="rename" style="width:99px;height:20px;font-size:10pt;border:0px;position:absolute; z-index:1000; " />
<div style="width:18px;border:0px;height:20px;position:absolute; left:100px;">
<select style="left:-100px;width:118px;background-color:#FFFFFF;position:absolute; " onchange="document.getElementById('rename').value=this.value;">
<option value="dddd">dddd</option>
<option value="aaa">aaa</option>
<option value="bbb">bbb </option>
</select>
</div>
</div> </body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="imagetoolbar" content="no" />
<title> </title>
</head>
<body>
<div id="Div1" style="height:200px; width:300px; overflow:auto;border:1px solid green;">
<div style="height:400px; width:200px;"></div>
</div>
<div style="height:50px; width:300px; overflow:auto;border:1px solid blue; margin:10px; padding:10px;">
<div style="border:1px solid green;width:118px;height:20px; position:absolute;">
<input type='text' id="rename" style="width:99px;height:20px;font-size:10pt;border:0px;position:absolute; z-index:1000; " />
<div style="width:18px;border:0px;height:20px;position:absolute; left:100px;">
<select style="left:-100px;width:118px;background-color:#FFFFFF;position:absolute; " onchange="document.getElementById('rename').value=this.value;">
<option value="dddd">dddd</option>
<option value="aaa">aaa</option>
<option value="bbb">bbb </option>
</select>
</div>
</div>
</div>
<div id="testDiv" style="height:200px; width:300px; overflow:auto;border:1px solid green;">
<div style="height:400px; width:200px;"></div>
</div></body>
</html>