var inputLname,inputFname,inputVcode,inputGcode,inputTel,inputCname,inputEmail,isvcodecorrect=true,isgcodecorrect=true; $(function(){ $(".box-reg .agree i#iagree").click(function () {//同意 $(this).toggleClass("on"); if ($(this).hasClass("on")){ } else{ } $("i#irefuse").removeClass('on'); }); $(".box-reg .agree i#irefuse").click(function () {//拒绝 $(this).toggleClass("on"); $("i#iagree").removeClass('on'); }); $(".box-reg .agree i#email").click(function () {//21.4.26 我愿意接收通讯邮件 $(this).toggleClass("on"); }); $(".options").hover(function(){ $(this).parent().find(".red-select").addClass("on"); },function(){ $(this).parent().find(".red-select").removeClass("on"); }); $(".red-select").click(function(){//下拉 $(".options").each(function(){ $(this).hide(); }); $(this).parent().find(".options").toggle(); }); $(document).click(function(){ $(".options").hide(); }) $(".red-select").click(function(){ return false; }); $(".options .option").click(function(){// $(this).parent().parent().parent().find(".red-select span").text($(this).text()); $(this).parent().parent(".options").hide(); }); })