jquery判断input选中事件

需求是默认第一个是选中状态,点第二个选中,第一个取消然后点支付时,跳转新页面

$(function(){
$(".nl_zhifutj a").click(function(){
var val=$('input:radio[name="zf"]:checked').val();
if(val=='wx'){
//window.location='index1.html';
}else{
window.location='zfbtxy.html';
}
})
})
原文地址:https://www.cnblogs.com/li-sir/p/7655145.html