可输入的下拉框

来源:互联网 发布:mysql error1064 编辑:程序博客网 时间:2024/05/16 09:33
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
 function getValue(value,inputId){
  document.getElementById(inputId).value=value;
 
 }
</script>
<style type="text/css">
<!--
#Layer1 {
 position:absolute;
 width:200px;
 height:115px;
 z-index:1;
 top: 17px;
 left: 9px;
}
-->
</style>
</head>

<body>
<div style="position:relative;"> <span style="margin-left:100px;width:18px;">
  <select name="select" style="width:118px;margin-left:-100px" onchange="getValue(this.value,'addressInput')">
    <option value="Ajax" selected="selected">Ajax</option>
    <option value="XML" disabled="disabled">XML</option>
    <option value="xmlHTTP">xmlHTTP</option>
    <option value="CSS">CSS</option>
  </select>
  </span>
    <input name="tag" id="addressInput" style="width:95px; border-style:none;position:absolute; left:2px; height:14px; ; top: 2px;" value="输入或选择" onmouseover="this.select()" />
</div>


<div id="Layer1"></div>
</body>
</html>

原创粉丝点击