function RndNum(n) {
var rnd = "";
for (var i = 0; i < n; i++)
rnd += Math.floor(Math.random() * 10);
return rnd;
}
var xxx = RndNum(3);
var handler = function (captchaObj) {
/*$("#btn_getcode1").click(function (e) {
onblurMobile();
var validate = captchaObj.getValidate();
if (!validate) {
$("#notice")[0].className = "show";
setTimeout(function () {
$("#notice")[0].className = "hide";
}, 2000);
e.preventDefault();
}
else
{
$("#hcaptcha").val("1");
showtime(60);
SendMobileCode();
}
});*/
// 将验证码加到id为captcha的元素里
console.log(captchaObj);
console.log(JSON.stringify(captchaObj));
//console.log(captchaObj.dom.innerHTML);
captchaObj.appendTo("#pop");
/*captchaObj.onReady(function () {
$("#wait")[0].className = "hide";
});*/
};
function showCode() {
if (onblurMobile()) {
$("#pop").html("");
$.ajax({
url: "/tools/getcaptcha.aspx?t=" + xxx + "&mobile=" + $("#txt_mobile").val() + "",
type: "get",
dataType: "json",
success: function (data) {
initGeetest({
width: '100%',
gt: data.gt,
challenge: data.challenge,
product: "embed",
offline: !data.success
}, function (captchaObj) {
captchaObj.appendTo("#pop");
captchaObj.onSuccess(function () {
console.log("success");
$("#hcaptcha").val("1");
showtime(60);
$("#pop").hide();
var validate = captchaObj.getValidate();
SendMobileCode(validate);
});
window.captchaObj = captchaObj;
});
}
});
$("#pop").show();
}
}
function SendMobileCode(validate) {
des = "tb"; console.log(PageMethods);
PageMethods.SendMobileCode($("#txt_mobile").val(),validate.geetest_challenge,validate.geetest_validate,validate.geetest_seccode, funReady, funError);
}
function funReady(result) {
result = JSON.parse(result);
if (result.data == 1) {
$("#div_captcha").val("验证码已发送!")
}
else {
alert(result.data);
}
}
function funError(err) {
alert("Error:" + err._message);
}
function showtime(t) {
document.getElementById("btn_getcode").disabled = true;
for (i = 1; i <= t; i++) {
window.setTimeout("update_p(" + i + "," + t + ")", i * 1000);
}
}
function update_p(num, t) {
if (num == t) {
document.getElementById("btn_getcode").value = " 重新发送 ";
document.getElementById("btn_getcode").disabled = false;
}
else {
printnr = t - num;
document.getElementById("btn_getcode").value = " (" + printnr + ")秒后重新发送";
}
}
function getmobilecode() {
onblurMobile();
showtime(60);
SendMobileCode();
}
|
|
|
|
杭州拓安机电技术有限公司
企业简介
9
杭州拓安机电技术有限公司是一家电动汽车充电机、便携式充电机、锂电池充电机、等产品的专业生产厂家,是浙江省高新技术企业.并具有自营进出口权。产品广泛应用于电动汽车、电动叉车、电动堆高车.洗地机.电动清扫车.电动高空作业车.电动观光游览车.医疗设备.机器人.无人机等行业。并为一些国际著名公司配套.
电动汽车充电机
电动汽车充电机、便携式充电机、锂电池充电机产品广泛应用于电动汽车、电动叉车、电动堆高车.洗地机.电动清扫车.电动高空作业车.电动观光游览车.医疗设备.机器人.无人机等行业。
电动汽车充电机
电动汽车充电机、便携式充电机、锂电池充电机产品广泛应用于电动汽车、电动叉车、电动堆高车.洗地机.电动清扫车.电动高空作业车.电动观光游览车.医疗设备.机器人.无人机等行业。
window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "24" }, "share": {}, "image": { "viewList": ["qzone", "tsina", "tqq", "renren", "weixin"], "viewText": "分享到:", "viewSize": "16" }, "selectShare": { "bdContainerClass": null, "bdSelectMiniList": ["qzone", "tsina", "tqq", "renren", "weixin"] } }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];
游客