html的跳转页面代码
function doublechooseclick() {
//alert("doublechooseclick");
$.ajax({
type: "POST",
dataType: "json",
url: "/HttpUrl/UserReg.ashx?UserMail=" + emailTxt,
success: function (msg) {
// alert(msg.user);
var user = msg.user;
var balance = msg.balance;
// alert(user);
/// alert(balance);
if (user != "") {
location.href = "RegSuccess.html?user=" + user + "&balance=" + balance; //location.href实现客户端页面的跳转
// location.href = "RegSuccess.html"; //location.href实现客户端页面的跳转
}
else {
alert("注册失败!");
return;
}
}
});
}
//function doublechooseclick() {
// $.post("/HttpUrl/UserReg.ashx", { id: "1", name: "join" }, function () { location.href = "/User/RegSuccess.html"; });
//}
//var falg = true; //定义是否通过的标志
//function bt_reg_C() {
// location.href = "/User/reg.html ";
//}
//$(document).ready(function () {
// $("#VerifyCode").bind("click", function () {
// $("#VerifyCode img").attr("src", "/Httpurl/RandomImage.ashx?time=" + Math.random());
// });
// $("#bt_login").bind("click", function () {
// //alert("1");
// login();
// });
//});
//function login() {///登陆
// var falg = "";
// var username = $("#UserName").val();
// var password = $("#PassWord").val();
// var val = $("#Validate").val();
// $.ajax({
// type: "POST",
// url: "/HttpUrl/UserReg.ashx?Validate=" + val,
// success: function (msg) {
// var msg = "ok"; ///测试先写死,到时候进行屏蔽
// if (msg == "ok") {
// falg = true;
// if (falg) {
// $.ajax({
// type: "POST",
// url: "/HttpUrl/index.ashx?type=3&uname=" + username + "&pwd=" + password,
// success: function (msg) {
// if (msg.user == username) {
// downdan("ssq", username); ///下单
// }
// else {
// alert("用户名密码错误!");
// }
// }
// });
// }
// }
// else {
// alert("验证码不一致!");
// falg = false;
// }
// }
// });
//}
///跳转按钮中的事件 最强护卫
function sure() {
var combination = getcombination();
var amount = $("#pt_bs").val() - 0;
var posturl = "/order/sure";
var count;
var btype = $("input[name='buyType']:checked").val();
var title; //追号名称:
if (btype == 3) {
posturl = "/order/autoplay";
count = $("#lx").val();
title = $(".chasing_name :text").val();
if (title == null || title == '') {
title = '追号';
}
if (count == null || count <= 0) {
alert("请输入追号的期数");
return;
}
}
var lotterytype = $("#lotterytype").val();
if ($("#lx_buy").attr("checked") == "checked") {
posturl = "/order/autoplay";
}
$.ajax({ //一个Ajax过程
type: "post",
url: posturl,
dataType: 'json',
data: {
combination: combination,
amount: amount,
lotterytype: lotterytype,
count: count,
title: title
},
success: function (data) {
if (data.success == true) {
tdialog("成功 ", "购买成功,请付款");
} else if (data.status == 0) {
$.ajax({
type: "get",
url: "/home/login",
data: {
isdialog: true
},
success: function (data) {
if (btype == 1) {
var m = "直接购买-无需登录就可购买真实姓名";
m += "身份证号码";
m += "中奖联系手机";
m += "";
tdialog("请登录", m + data);
} else if (btype == 3) {
tdialog("请登录", data);
}
}
});
} else if (data.status == 2) {
tdialog("请完善身份信息", "点此完善信息");
} else {
tdialog("失败了", data.info);
}
}
});
特别提示:本信息由相关用户自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。