这段代码 咋能用到我的
<script>var timeOut = 10000;
function callpost(){
var receiverNumber=$('receiverNumber').value;
var receiverNumbeNo=$('receiverNumberNo').value;
var isTelChecked = $("telRadio").checked;
var isMobileChecked = $("mobileRadio").checked;
if(isTelChecked){
var areaCode = $("areaCode").value;
var telNumber = $("telNumber").value;
if(areaCode.match(/^\d{3,5}$/) && telNumber.match(/^\d{7,8}$/)) {
var callNumber = areaCode + telNumber;
} else {
alert("电话号码填写有误,请确认");
return false;
}
}else if(isMobileChecked){
var mobileNumber = $("mobileNumber").value;
if(mobileNumber.match(/^\d{11,12}$/)) {
var callNumber = mobileNumber;
} else {
alert("手机号码填写有误,请确认");
return false;
}
}else{
return false;
}
if(confirm('您拨打的电话是:'+receiverNumber)){
$('msg').innerHTML = '正在拨号,请稍候...';
getAjax('postcall/?id=18471n'+receiverNumbeNo+'&callNumber='+callNumber,
function(txt){
var errMsg = '';
switch(parseInt(txt)){
case 1:
errMsg = '拨打成功,请接听!!';
break;
case 2:
errMsg = '拨打失败,非法链接,请重新在拨!!';
break;
case 3:
errMsg = '你要拨打的电话正在通话中…,请稍后再拨!';
break;
case 4:
errMsg = '拨打失败,号码不正常,请重新在拨!!';
break;
case 5:
errMsg = '拨打失败,传值中的日期与车音网的日期不同,请重新在拨!!';
break;
case 6:
errMsg = "拨打失败,系统原因,请重新在拨!!";
break;
case 7:
errMsg = '拨打失败!重复拨打!';
break;
default:
errMsg = "拨打失败,请重新在拨!!";
}
//$('msg').innerHTML=errMsg;
//alert(errMsg);
if(parseInt(txt)==1){
var wait = setTimeout(function(){
$('msg').innerHTML='拨号成功,准备接听!!';
},timeOut);
}else{
$('msg').innerHTML='线路忙,请重新拨号!!';
}
},
function(){
$('msg').innerHTML='';
alert('拨打失败,请重新在拨');
}
);
return true;
}else{
return false;
}
}
function $(id){
return document.getElementById(id);
}
</script>咋能用到我的页面上不错误 额。。咋没看到你的表单? 哦liugan.org.ru 拷到页面 搞个触发即可 getAjax('postcall/?id=18471n'+receiverNumbeNo+'&callNumber='+callNumber,
页:
[1]