87,904
社区成员
发帖
与我相关
我的任务
分享
$("#registOK").click(function () {
if (checkExist()) {
$("#registOK").unbind("click");
$.fillObj(userinfo, "#main");
$.ajax({
type: "post",
url: "/Register/SaveUserinfo.html",
data: { userinfo: $.toJSON(userinfo), pwd: $("#userpwd").val(), shcode: $("#Tb_telpas").val() },
beforeSend: function (XMLHttpRequest) {
},
success: function (data, textStatus) {
if (data == 0) {
$("#code").attr("className", "Error");
$("#code").text("验证码错误");
}
if (data == 1) {
window.location.href = "/Register/RegistResult.html?from=" + from;
}
},
complete: function (XMLHttpRequest, textStatus) {
alert('c');
$("#registOK").bind("click");
},
error: function () {
}
});
}
});
<input type="button" id="test">
<script>
$("#test").bind("click",function() {
$("#test").unbind("click");
aaa();
$("#test").bind("click",function(){
aaa();
});
})
function aaa(){
alert("ok");
}
</script>