label:for事件的绑定

来源:互联网 发布:线切割如何编程软件 编辑:程序博客网 时间:2024/06/16 05:59
<!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="jquery-1.11.3.min.js"></script>
<style>
label{height:20px;width:20px; background-color:yellow;display:block;border: 1px red solid;border-radius:50%;float:left;margin-left:20px;}
input{display:block;float:left;;}
</style>
<script>
</script>
</head>
<body>
<div>
<input type="radio" name="choice" id="choiceA"/>
<label for="choiceA"></label>
<input type="radio" name="choice" id="choiceB"/>
<label for="choiceB"></label>
</div>
</body>
</html>
0 0
原创粉丝点击