<HTML>
<HEAD>
<META http-equiv='Content-Type' content='text/html; charset=gb2312'>
<TITLE>js实现可输入的下拉框</TITLE>
</HEAD>
<BODY>
<div style="position:relative;">
<span style="margin-left:100px;width:18px;overflow:hidden;">
<select style="width:118px;margin-left:-100px" onchange="this.parentNode.nextSibling.value=this.value">
<option value="德国">德国</option>
<option value="挪威">挪威</option>
<option value="瑞士"> 瑞士</option>
</select></span><input name="box" style="width:100px;position:absolute;left:0px;">
</div>
</BODY>
</HTML>

js实现可输入的下拉框

 这样效果更好些:

<select style="width: 118px; margin-left: -100px;" onfocus="onchange();" onchange="this.parentNode.nextSibling.value=this.value">

 

相关文章:

  • 2021-12-09
  • 2022-12-23
  • 2022-01-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-30
  • 2022-12-23
  • 2022-01-19
  • 2021-11-12
  • 2022-12-23
相关资源
相似解决方案