我的下拉框长度如何换行显示. 下拉框带翻页吗?自己做个ActiveX好了. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 net_lover(孟子E章): div模仿,有没有现成的例子看看. <html><head><title>模拟下拉列表框</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style>body,td,div {font:12px 宋体}label {height:19px;padding:3px 0px 0px 4px}.link_box {text-align:left;cursor:default}.link_head {width:100%;height:23;border:2px inset}.link_text {background:#fff;padding-left:2px}.link_arrow0 {font:14px marlett;text-align:center;width:22;height:100%;border:2px outset;background:buttonface}.link_arrow1 {font:14px marlett;text-align:center;width:22;height:100%;border:1px solid buttonshadow;padding:2px 0px 0px 2px;background:buttonface}.link_value {position:absolute;visibility:hidden;border:1px solid;overflow:auto;overflow-x:hidden;filter:alpha(opacity:0)}.link_record0{width:100%;height:20;border-top:1px solid #eee;background:#fff;color:#000;padding-left:2px}.link_record1{width:100%;height:20;border-top:1px solid #047;background:#058;color:#fe0;padding-left:2px}</style><script>var dropShow=falsevar currentIDfunction dropdown(el){if(dropShow){dropFadeOut()}else{currentID=elel.style.visibility="visible"dropFadeIn()}}function dropFadeIn(){//选单淡入的效果if(currentID.filters.alpha.opacity<100){currentID.filters.alpha.opacity+=20fadeTimer=setTimeout("dropFadeIn()",50)}else{dropShow=trueclearTimeout(fadeTimer)}}function dropFadeOut(){//选单淡出的效果if(currentID.filters.alpha.opacity>0){clearTimeout(fadeTimer)currentID.filters.alpha.opacity-=20fadeTimer=setTimeout("dropFadeOut()",50)}else{dropShow=falsecurrentID.style.visibility="hidden"}}function dropdownHide(){if(dropShow){dropFadeOut()dropShow=false}}function hiLight(el){//高亮度显示指标位置if(dropShow){for(i=0;i<el.parentElement.childNodes.length;i++){el.parentElement.childNodes(i).className="link_record0"}el.className="link_record1"}}function CheckMe(el){//替换显示内容el.parentElement.parentElement.childNodes(0).childNodes(0).childNodes(0).childNodes(0).childNodes(0).childNodes(0).innerHTML=el.innerHTML}document.onclick=dropdownHide</script> </head><body bgcolor="#0099FF" text="#000000" onload="document.form1.reset()"><table align="center" width="100%" height="100%"><tr><td align="center"><table cellpadding=4 cellspacing=2 bgcolor=#a0a0a0 align="center"><tr><td bgcolor=#ddeeff width=160>范例1 (使用于表单)</td><td bgcolor=#ddeeff width=270>范例2 (使用于超连结)</td></tr><tr><td bgcolor=#e0e0e0 align=center><!--// 范例 1 开始 //--><table><tr><form name=form1 onsubmit="alert(city.value);return false"><td><div class=link_box style="width:100px" onselectStart="return false"><div class=link_head onclick="dropdown(value1)"><table width=100% height=100% border=0 cellpadding=0 cellspacing=0><tr><td><div id=text1 class=link_text><label>请选择?</label></div></td><td width=22 align=right><div class=link_arrow0 onmousedown="this.className='link_arrow1'" onmouseup="this.className='link_arrow0'" onmouseout="this.className='link_arrow0'">6</div></td></tr></table></div><div id=value1 class=link_value style="width:100%;height:100px"><div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>北京市</label></div><div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>上海市</label></div><div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>河南省</label></div><div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>深圳市</label></div><div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>大连市</label></div><div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>云南省</label></div></div></div></td><td><input type="hidden" name="city" value="您尚未选择"><input type="submit" value="确定"></td></form></tr></table><!--// 范例 1 结束 //--></td><td bgcolor=#e0e0e0 align=center><!--// 范例 2 开始 //--><div class=link_box style="width:250px" onselectStart="return false"><div class=link_head onclick="dropdown(value2)"><table width=100% height=100% border=0 cellpadding=0 cellspacing=0><tr><td><div class=link_text><img src="http://dotnet.aspx.cc/Images/smile.gif" align="absmiddle"><label>您想要浏览哪个网站?</label></div></td><td width=22 align=right><div class=link_arrow0 onmousedown="this.className='link_arrow1'" onmouseup="this.className='link_arrow0'" onmouseout="this.className='link_arrow0'">6</div></td></tr></table></div><div id=value2 class=link_value style="width:100%;height:82px"><div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com')"><img src="http://dotnet.aspx.cc/images/copyright.gif" align="absmiddle"><label>【孟宪会之精彩世界】一</label></div><div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com/')"><img src="http://dotnet.aspx.cc/images/copyright.gif" align="absmiddle"><label>【孟宪会之精彩世界】二</label></div><div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com')"><img src="http://dotnet.aspx.cc/images/meng.gif" align="absmiddle"><label>【孟宪会之<br>精彩世界】一</label></div><div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com/')"><img src="http://dotnet.aspx.cc/images/meng.gif" align="absmiddle"><label>【孟宪会之精彩世界】二</label></div><div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://www.sina.com.cn/')"><img src="http://dotnet.aspx.cc/images/meng.gif" align="absmiddle"><label>新浪网</label></div></div></div><!--// 范例 2 结束 //--></td></tr></table> </body></html> 给Option加个属性Title来显示Text的值 简单问题,求指导。。 求一个正则表达式的写法 关于 jq 中 getJSON jquery dialog 中可以写 if吗? 直接拿别人网站上的js来用会不会侵权 大侠们帮忙:javascript的onmouseout使用方法 onclick 如何设置<body>中的属性 高手过来看一下 这三个页面单独都没问题 连在一起就有问题 怎么获取当前系统短时间与数据库中的 时间做比较 下面函数的ObjName我写select的name为什么说找不到对象??? [求助]怎样用VML在图片上画线,而不被图片覆盖 DREAMWEAVER上的JS调试器老是打不开,有何办法?
<head>
<title>模拟下拉列表框</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
body,td,div {font:12px 宋体}
label {height:19px;padding:3px 0px 0px 4px}
.link_box {text-align:left;cursor:default}
.link_head {width:100%;height:23;border:2px inset}
.link_text {background:#fff;padding-left:2px}
.link_arrow0 {font:14px marlett;text-align:center;width:22;height:100%;border:2px outset;background:buttonface}
.link_arrow1 {font:14px marlett;text-align:center;width:22;height:100%;border:1px solid buttonshadow;padding:2px 0px 0px 2px;background:buttonface}
.link_value {position:absolute;visibility:hidden;border:1px solid;overflow:auto;overflow-x:hidden;filter:alpha(opacity:0)}
.link_record0{width:100%;height:20;border-top:1px solid #eee;background:#fff;color:#000;padding-left:2px}
.link_record1{width:100%;height:20;border-top:1px solid #047;background:#058;color:#fe0;padding-left:2px}
</style>
<script>
var dropShow=false
var currentID
function dropdown(el){
if(dropShow){
dropFadeOut()
}else{
currentID=el
el.style.visibility="visible"
dropFadeIn()
}
}
function dropFadeIn(){//选单淡入的效果
if(currentID.filters.alpha.opacity<100){
currentID.filters.alpha.opacity+=20
fadeTimer=setTimeout("dropFadeIn()",50)
}else{
dropShow=true
clearTimeout(fadeTimer)
}
}
function dropFadeOut(){//选单淡出的效果
if(currentID.filters.alpha.opacity>0){
clearTimeout(fadeTimer)
currentID.filters.alpha.opacity-=20
fadeTimer=setTimeout("dropFadeOut()",50)
}else{
dropShow=false
currentID.style.visibility="hidden"
}
}
function dropdownHide(){
if(dropShow){
dropFadeOut()
dropShow=false
}
}
function hiLight(el){//高亮度显示指标位置
if(dropShow){
for(i=0;i<el.parentElement.childNodes.length;i++){
el.parentElement.childNodes(i).className="link_record0"
}
el.className="link_record1"
}
}
function CheckMe(el){//替换显示内容
el.parentElement.parentElement.childNodes(0).childNodes(0).childNodes(0).childNodes(0).childNodes(0).childNodes(0).innerHTML=el.innerHTML
}
document.onclick=dropdownHide
</script>
</head><body bgcolor="#0099FF" text="#000000" onload="document.form1.reset()">
<table align="center" width="100%" height="100%">
<tr><td align="center">
<table cellpadding=4 cellspacing=2 bgcolor=#a0a0a0 align="center"><tr>
<td bgcolor=#ddeeff width=160>范例1 (使用于表单)</td><td bgcolor=#ddeeff width=270>范例2 (使用于超连结)</td></tr>
<tr><td bgcolor=#e0e0e0 align=center>
<!--// 范例 1 开始 //-->
<table><tr><form name=form1 onsubmit="alert(city.value);return false"><td>
<div class=link_box style="width:100px" onselectStart="return false">
<div class=link_head onclick="dropdown(value1)">
<table width=100% height=100% border=0 cellpadding=0 cellspacing=0><tr>
<td><div id=text1 class=link_text><label>请选择?</label></div></td>
<td width=22 align=right><div class=link_arrow0 onmousedown="this.className='link_arrow1'" onmouseup="this.className='link_arrow0'" onmouseout="this.className='link_arrow0'">6</div></td>
</tr></table>
</div>
<div id=value1 class=link_value style="width:100%;height:100px">
<div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>北京市</label></div>
<div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>上海市</label></div>
<div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>河南省</label></div>
<div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>深圳市</label></div>
<div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>大连市</label></div>
<div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>云南省</label></div>
</div>
</div>
</td><td>
<input type="hidden" name="city" value="您尚未选择">
<input type="submit" value="确定">
</td></form></tr></table>
<!--// 范例 1 结束 //-->
</td>
<td bgcolor=#e0e0e0 align=center>
<!--// 范例 2 开始 //-->
<div class=link_box style="width:250px" onselectStart="return false">
<div class=link_head onclick="dropdown(value2)">
<table width=100% height=100% border=0 cellpadding=0 cellspacing=0><tr>
<td><div class=link_text><img src="http://dotnet.aspx.cc/Images/smile.gif" align="absmiddle"><label>您想要浏览哪个网站?</label></div></td>
<td width=22 align=right><div class=link_arrow0 onmousedown="this.className='link_arrow1'" onmouseup="this.className='link_arrow0'" onmouseout="this.className='link_arrow0'">6</div></td>
</tr></table>
</div>
<div id=value2 class=link_value style="width:100%;height:82px">
<div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com')"><img src="http://dotnet.aspx.cc/images/copyright.gif" align="absmiddle"><label>【孟宪会之精彩世界】一</label></div>
<div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com/')"><img src="http://dotnet.aspx.cc/images/copyright.gif" align="absmiddle"><label>【孟宪会之精彩世界】二</label></div>
<div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com')"><img src="http://dotnet.aspx.cc/images/meng.gif" align="absmiddle"><label>【孟宪会之<br>精彩世界】一</label></div>
<div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com/')"><img src="http://dotnet.aspx.cc/images/meng.gif" align="absmiddle"><label>【孟宪会之精彩世界】二</label></div>
<div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://www.sina.com.cn/')"><img src="http://dotnet.aspx.cc/images/meng.gif" align="absmiddle"><label>新浪网</label></div></div>
</div>
<!--// 范例 2 结束 //-->
</td></tr>
</table> </body>
</html>