function checkVcode(){ |
var call_vcode = document.getElementById( "vcode" ).value; |
var myPhone = document.getElementById( "myPhone" ).value; |
var inputPhone = document.getElementById( "inputPhone" ).value; |
|
$.post( |
'../action/checkcode.php?type=call' , |
{ |
vcode:call_vcode |
}, |
function (data) //回调函数 |
{ |
var myjson= '' ; |
|
eval( 'myjson=' + data + ';' ); |
if (myjson.result==0){ |
document.getElementById( "errhtm" ).innerHTML= '验证码错误' ; |
document.getElementById( "vcode" ).focus(); |
return false ; |
} else { |
$.post( |
'../action/call_request_test.action.php' , |
{ |
myPhone:myPhone, |
inputPhone :inputPhone |
}, |
function (data) |
{ |
var myjson= '' ; |
eval( 'myjson=' + data + ';' ); |
if (myjson.result==0){ |
document.getElementById( "tishi" ).style.display = "block" ; |
document.getElementById( "tishi" ).innerHTML = "<span style='font-size:18px;color:red'>连接失败,请重试</span>" ; |
} else { |
document.getElementById( "errhtm" ).innerHTML = '' ; |
var number = document.getElementById( "number" ); |
number.innerHTML= document.getElementById( "inputPhone" ).value; |
number.style.display = "block" ; |
document.getElementById( "tishi" ).style.display = "block" ; |
document.getElementById( "tishi" ).innerHTML = "<img id=\"ti\" src=\"../images/xiaojiantou.gif\" width=\"100px\" height=\"13px\"/>" ; |
|
} |
} |
); |
} |
} |
); |
} |