html使用单选按钮组改变背景
<!doctypehtml><html><head><metacharset="utf-8"><title>无标题文档</title><scriptlanguage="j...
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script language="javascript" type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script language="javascript">
$(function(){
$("#RadioGroup1_0").click(function(){
alert("aaaa")
$("div1").css("backgroundColor","red")
})
})
</script>
</head>
<body>
<div id="div1">
<p>
<label>
<input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_0">
单选
</label>
</p>
</div>
</body>
</html>
点击按钮会有弹框出现但是背景颜色不改变 展开
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script language="javascript" type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script language="javascript">
$(function(){
$("#RadioGroup1_0").click(function(){
alert("aaaa")
$("div1").css("backgroundColor","red")
})
})
</script>
</head>
<body>
<div id="div1">
<p>
<label>
<input type="radio" name="RadioGroup1" value="单选" id="RadioGroup1_0">
单选
</label>
</p>
</div>
</body>
</html>
点击按钮会有弹框出现但是背景颜色不改变 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询