日期:2014-05-16 浏览次数:20346 次
<script type="text/javascript">
if(document.getElementById("cac_bus").checked) {
alert("选中");
}
// var x=document.getElementById("cac_bus_info")
</script>
<body>
<div id = "aa">
<label><input type = "radio" name = "a" value = "1"/>aaaa</label>
<label><input type = "radio" name = "a" value = "2" checked = "true"/>bbbb</label>
</div>
</body>
<script>
document.getElementById("aa").onclick = function(e){
e = e
------解决方案--------------------
window.event;
var target = e.srcElement
------解决方案--------------------
e.target,
tagName = target.tagName.toLowerCase();
if(tagName == "input" && target.value == 2){
alert("222");
}
}
</script>
</html>