<script language="javascript">
function doSubmit(){
var reg = /^((13[4-9]{1})|(15[0,1,7,8,9]{1})){1}\d{8}$/;
var num = document.getElementById('myMobileNum').value.trim();
//alert(num);
if (!reg.test(num)){
//document.getElementById('validatecode').style.display='';
alert("请输入移动手机号");
return;
}
document.preOrder.action="preOrderInfo!doOrderInfo.action";
document.preOrder.submit();
}
String.prototype.trim = function () {
var reExtraSpace = /^\s*(.*?)\s*$/;
return this.replace(reExtraSpace, "$1");
};
function doSubmit(){
var reg = /^((13[4-9]{1})|(15[0,1,7,8,9]{1})){1}\d{8}$/;
var num = document.getElementById('myMobileNum').value.trim();
//alert(num);
if (!reg.test(num)){
//document.getElementById('validatecode').style.display='';
alert("请输入移动手机号");
return;
}
document.preOrder.action="preOrderInfo!doOrderInfo.action";
document.preOrder.submit();
}
String.prototype.trim = function () {
var reExtraSpace = /^\s*(.*?)\s*$/;
return this.replace(reExtraSpace, "$1");
};
</script>
本文转自 august 51CTO博客,原文链接:http://blog.51cto.com/august/136312,如需转载请自行联系原作者