<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>可输入的下拉框</title> <meta name="description" content=""> <meta name="keywords" content=""> <link href="" rel="stylesheet"> </head> <body> <style type="text/css"> input:focus{ /*去掉focus效果*/ outline: none; } </style> <div style="position:relative"> <div style="display:inline"> <select name="sel" onchange="this.parentNode.nextSibling.value=this.value" style="width:200px;height:30px;"> <option value="第一选择">第一选择</option> <option value="第二选择">第二选择</option> </select> </div><input name="box" type="text" style="position:absolute;top:2px;left:2px;height:24px;border:none"> </div> </body> </html>
来源:https://www.cnblogs.com/zqbgds/p/6370457.html