实现可选可手输入的下拉框
2010-10-19 11:41
169 查看
直接上代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<input style="position: absolute; left: 10; top 10; width: 100; height: 23" type="text" value="some text" name="txt">
<select style="position: absolute; left: 10; top 10; width: 100; height: 22;clip:rect(auto auto auto 83)" name="cbo">
<option selected>1</option>
<option>2</option>
</select>
<br>
<input type="button" value="test" onclick="test()">
<script language="javascript">
function test()
{
cbo.style.clip = "rect(auto auto auto " + (txt.clientWidth - 17) + ")";
}
</script>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<input style="position: absolute; left: 10; top 10; width: 100; height: 23" type="text" value="some text" name="txt">
<select style="position: absolute; left: 10; top 10; width: 100; height: 22;clip:rect(auto auto auto 83)" name="cbo">
<option selected>1</option>
<option>2</option>
</select>
<br>
<input type="button" value="test" onclick="test()">
<script language="javascript">
function test()
{
cbo.style.clip = "rect(auto auto auto " + (txt.clientWidth - 17) + ")";
}
</script>
</body>
</html>
相关文章推荐
- DropDownList实现可输入可选择(两种版本可选)
- js实现可输入可选择的select下拉框
- jQuery实现可输入搜索文字的下拉框
- js实现可输入的下拉框
- jQuery插件实现可输入和自动匹配的下拉框
- 可输入下拉框的实现。
- jsp页面可输入下拉框实现
- HTML可输可选下拉框实现的JavaScript脚本
- 自定义控件 实现文本框输入模仿下拉框选择功能
- 可输入下拉框,css+js实现
- sencha里用html5实现类似combobox组件,可选可输入
- select下拉框实现输入功能
- 可输入的下拉框(简易实现)
- jQuery插件实现可输入和自动匹配的下拉框
- 可输入文字查找ajax下拉框控件 ComBox的实现方法
- 使用easyUI的combobox下拉框控件实现输入提示功能(google suggest)
- [原]考试系统——可输入并自动匹配的下拉框(一)——实现可输入并自动匹配
- 利用jQuery实现可输入搜索文字的下拉框
- AJAX.NET实现根据输入内容自动填充下拉框