$("input:radio[name=‘OperateType‘]").change(function () {
var item = $("input[name=‘OperateType‘]:checked").val();
if (item == 1) {
$("#publishSoft").show();
}
else if (item == 2) {
$("#publishSoft").hide();
}
else if (item == 3) {
$("#publishSoft").hide();
}
});
通过radio的不同选择,隐藏/显示一个div元素。
原文:http://my.oschina.net/zyxchuxin/blog/407967