Item是DropDownList里面的Item.
ck就是checkboxItem1 后面 跟着一组checkbox
Item2 后面也跟着一组checkbox...
.............Item ck1 ck2 ck3 ck4
怎么样才能实现这种效果呢?不知道我表达清楚了没有,还请高手帮个忙。谢谢。
ck就是checkboxItem1 后面 跟着一组checkbox
Item2 后面也跟着一组checkbox...
.............Item ck1 ck2 ck3 ck4
怎么样才能实现这种效果呢?不知道我表达清楚了没有,还请高手帮个忙。谢谢。
解决方案 »
- |zyciis| 急求ASP.NET用户控件的属性如何做成子标签格式,谢谢
- ViewState
- asp.net 怎么生成<news:news> 这样的节点?
- 急救????大虾门,辛苦了
- Membership.CreateUser()使用出错!
- 求高手解答,关于.net2003下DataGrid里动态添加模班列嵌入CheckBox如何判断选中的问题? 解决马上结贴
- 如何能把DataDrid中的控件的样式改掉?
- <img src....>的问题
- 如何在设置焦点后,页面也同时移至焦点处,我已经设置SmartNavigation = "true"了,急!!!
- 为什么我的机器无法运行asp.net
- textbox如何显示成立体效果,就像vb的一样
- asp.net2.0SqlParameter[]问题
<head>
<meta http-equiv="content-type" content="text/tml;charset=gb2312" />
<title>Div模拟select的option</title>
<style type="text/css">
body{font-size:12pt}
</style>
<script type="text/javascript">
function ShowDiv()
{
var divS=document.getElementById("divSelect");
if(divS.style.display=="none")
{
var item=divS.getElementsByTagName("div");
var divCT=document.getElementById("divCT");
for(var i=0;i<item.length;i++)
{
if(item[i].innerHTML==divCT.innerHTML)
{
item[i].style.backgroundColor='#082569';
item[i].style.color='white';
}
}
divS.style.display="";
}
else
divS.style.display="none";
}
function SetSpan(Html,e)
{
e=e||event;
var tag=e.srcElement?e.srcElement:e.target;
if(tag.type!="checkbox")
{
document.getElementById("divCT").innerHTML=Html;
document.getElementById("divSelect").style.display="none";
}
}
document.onclick=function(e)
{
e=e||event;
var tag=e.srcElement?e.srcElement:e.target;
if(tag.tagName=="BODY")
document.getElementById("divSelect").style.display="none";
}
</script>
</head>
<body>
<div id="divCT" style="position:absolute;left:100px;top:100px;width:300px;height:21px; border:solid 1px black;
border-bottom-width:1px; border-bottom-color:#cccccc;border-bottom-style:solid; margin:0px">请选择......</div>
<!-----下面这张图片就是select最右边的箭头---->
<img style="position:absolute;top:102px;left:384px;" border="0px" src="select.bmp" onclick="ShowDiv()"/>
<div id="divSelect" style="position:absolute;left:100px;top:121px; border:solid 1px black;width:300px;display:none">
<div onmouseover="this.style.backgroundColor='#082569';this.style.color='white';"
onmouseout="this.style.backgroundColor='white';this.style.color='black';" onclick="SetSpan(this.innerHTML,event)">
请选择......</div>
<div onmouseover="this.style.backgroundColor='#082569';this.style.color='white';"
onmouseout="this.style.backgroundColor='white';this.style.color='black';" onclick="SetSpan(this.innerHTML,event)">
Item1 <input type="checkbox" />1 <input type="checkbox" />2 <input type="checkbox" />3
<input type="checkbox" />4 <input type="checkbox" />5</div>
<div onmouseover="this.style.backgroundColor='#082569';this.style.color='white';"
onmouseout="this.style.backgroundColor='white';this.style.color='black';" onclick="SetSpan(this.innerHTML,event)">
Item2 <input type="checkbox" />1 <input type="checkbox" />2 <input type="checkbox" />3
<input type="checkbox" />4 <input type="checkbox" />5</div>
<div onmouseover="this.style.backgroundColor='#082569';this.style.color='white';"
onmouseout="this.style.backgroundColor='white';this.style.color='black';" onclick="SetSpan(this.innerHTML,event)">
Item3 <input type="checkbox" />1 <input type="checkbox" />2 <input type="checkbox" />3
<input type="checkbox" />4 <input type="checkbox" />5</div>
<div onmouseover="this.style.backgroundColor='#082569';this.style.color='white';"
onmouseout="this.style.backgroundColor='white';this.style.color='black';" onclick="SetSpan(this.innerHTML,event)">
Item4 <input type="checkbox" />1 <input type="checkbox" />2 <input type="checkbox" />3
<input type="checkbox" />4 <input type="checkbox" />5</div>
<div onmouseover="this.style.backgroundColor='#082569';this.style.color='white';"
onmouseout="this.style.backgroundColor='white';this.style.color='black';" onclick="SetSpan(this.innerHTML,event)">
Item5 <input type="checkbox" />1 <input type="checkbox" />2 <input type="checkbox" />3
<input type="checkbox" />4 <input type="checkbox"/>5</div>
</div>
</body>
</html>