哈,多谢沙发!脚本改进了一下!可惜还是不支持键盘和滚轮!<script language="JavaScript" defer>
<!--
var oTb = document.getElementById("tbInput");
var oBtn = document.getElementById("btnSelect");
var oSel = document.getElementById("cats");
oSel.style.display = "none";document.body.onclick = function()
{
oSel.style.display = "none";
};oBtn.onclick = function()
{
event.cancelBubble = true;
var OptCount = oSel.options.length
oSel.size = OptCount > 10 ? 10 : OptCount;
oSel.style.display = "block";
};oSel.onchange = function()
{
oTb.value = this.options[this.selectedIndex].text;
oSel.style.display = "none";
};oSel.onblur = function()
{
oSel.style.display = "none";
};
//-->
</script>
<!--
var oTb = document.getElementById("tbInput");
var oBtn = document.getElementById("btnSelect");
var oSel = document.getElementById("cats");
oSel.style.display = "none";document.body.onclick = function()
{
oSel.style.display = "none";
};oBtn.onclick = function()
{
event.cancelBubble = true;
var OptCount = oSel.options.length
oSel.size = OptCount > 10 ? 10 : OptCount;
oSel.style.display = "block";
};oSel.onchange = function()
{
oTb.value = this.options[this.selectedIndex].text;
oSel.style.display = "none";
};oSel.onblur = function()
{
oSel.style.display = "none";
};
//-->
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货