赞
踩
js代码:
//弹窗注册协议
ms=window.parent.document.getElementById('inputzz1');
ks=window.parent.document.getElementById('inputzz');
$('#yes-agree').click(function(){
console.log(ms);
if(!(ms.getAttribute('checked'))){
console.log(123);
$("#inputzz1").attr("checked",true);
$("#check-do1").addClass("check-do-on");
$("button[title='注册']").removeAttr("disabled","disabled").css("background-color","#E4393C");//启用提交按钮
console.log(1234);
}
if(!(ks.getAttribute('checked'))){
$("#inputzz").attr("checked",true);
$("#check-do").addClass("check-do-on");
$(".pt-mid").css({"background-position":"-57px -303px"},
{"width":"175px"},{"height":"33px"});
$("#btnrdz").removeAttr('disabled','disabled');//禁用提交按钮
}
$('.sc-model').fadeOut().html("");
$('.sc-zzc-bg').fadeOut();
});
$('#no-agree').click(function(){
if(ms.getAttribute('checked')){
console.log(123);
$("#inputzz1").attr("checked",false);
$("#check-do1").removeClass("check-do-on");
$("button[title='注册']").attr('disabled','disabled').css("background-color","#ccc");//禁用提交按钮
}
if(ks.getAttribute('checked')){
$("#inputzz").attr("checked",false);
$("#check-do").removeClass("check-do-on");
$(".pt-mid").css({"background-position":"-610px -583px"},
{"width":"175px"},{"height":"33px"});
$("#btnrdz").attr('disabled','disabled');//禁用提交按钮
}
$('.sc-model').fadeOut().html("");
$('.sc-zzc-bg').fadeOut();
});
触发事件html片段:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。