Asp中如何让checkboxList变单选框?
2个回答
2013-07-31
展开全部
用jquery写的简单例子
<!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=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src=" http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$(".chkbox").click(function(){
$(this).siblings().attr("checked",false);
});
});
</script>
</head>
<body>
<input type="checkbox" class="chkbox" />
<input type="checkbox" class="chkbox" />
<input type="checkbox" class="chkbox" />
</body>
</html>
<!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=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src=" http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$(".chkbox").click(function(){
$(this).siblings().attr("checked",false);
});
});
</script>
</head>
<body>
<input type="checkbox" class="chkbox" />
<input type="checkbox" class="chkbox" />
<input type="checkbox" class="chkbox" />
</body>
</html>
2013-07-31
展开全部
比较困难,你百度找就有!!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询