欢迎各位兄弟 发布技术文章
这里的技术是共享的
<html><head>
<script type="text/javascript" src="./jquery.min.js"></script></head><body><div>
<input id="rdo1" name="rdo1" type="radio" value="1" checked="checked"/>是
<input id="rdo1" name="rdo1" type="radio" value="0"/>否
<button id="btn1">是</button>
<button id="btn2">否</button><div><script type="text/javascript">
$(function(){
$("#btn1").click(function(){
$("input[name='rdo1']").eq(0).attr("checked","checked");
$("input[name='rdo1']").eq(1).removeAttr("checked");
$("input[name='rdo1']").eq(0).click();
});
$("#btn2").click(function(){
$("input[name='rdo1']").eq(0).removeAttr("checked");
$("input[name='rdo1']").eq(1).attr("checked","checked");
$("input[name='rdo1']").eq(1).click();
});
});</script></body></html>