28,404
社区成员
发帖
与我相关
我的任务
分享<SCRIPT LANGUAGE="JavaScript">
<!--
function checkuserinfo()
{
if(checkspace(document.userinfo.dingdanhao.value)) {
document.userinfo.dingdanhao.focus();
alert("请认真填写订单号!");
return false;
}
if(checkspace(document.userinfo.dianpu.value)) {
document.userinfo.dianpu.focus();
alert("请认真填写店铺名称!");
return false;
}
if(checkspace(document.userinfo.wangwang.value)) {
document.userinfo.wangwang.focus();
alert("请认真填写会员号!");
return false;
}
if(checkspace(document.userinfo.shouhuoname.value)) {
document.userinfo.shouhuoname.focus();
alert("请认真填写收货人姓名!");
return false;
}
if(checkspace(document.userinfo.tel.value)) {
document.userinfo.tel.focus();
alert("请认真填写电话!");
return false;
}
if(checkspace(document.userinfo.address.value)) {
document.userinfo.address.focus();
alert("请认真填写地址!");
return false;
}
if(checkspace(document.userinfo.zhifu.value)) {
document.userinfo.zhifu.focus();
alert("请认真填写支付方式!");
return false;
}
if(checkspace(document.userinfo.shangpin.value)) {
document.userinfo.shangpin.focus();
alert("请认真填写主商品!");
return false;
}
//if(checkspace(document.userinfo.wuliu.value)) {
// document.userinfo.wuliu.focus();
// alert("请认真填写物流!");
// return false;
// }
//
//
// if(checkspace(document.userinfo.danhao.value)) {
// document.userinfo.danhao.focus();
// alert("请认真填写物流单号!");
// return false;
// }
if(checkspace(document.userinfo.zongjia.value)) {
document.userinfo.zongjia.focus();
alert("请认真填写总价!");
return false;
}
}
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
//-->
</script><script language="javascript">
function my_submit(){
document.form1.submit();
document.form1.submit1.disabled=true;
}
</script> function checkuserinfo() {
if (checkspace(document.userinfo.dingdanhao.value)) {
document.userinfo.dingdanhao.focus();
alert("请认真填写订单号!");
return false;
}
if (checkspace(document.userinfo.dianpu.value)) {
document.userinfo.dianpu.focus();
alert("请认真填写店铺名称!");
return false;
}
if (checkspace(document.userinfo.wangwang.value)) {
document.userinfo.wangwang.focus();
alert("请认真填写会员号!");
return false;
}
if (checkspace(document.userinfo.shouhuoname.value)) {
document.userinfo.shouhuoname.focus();
alert("请认真填写收货人姓名!");
return false;
}
if (checkspace(document.userinfo.tel.value)) {
document.userinfo.tel.focus();
alert("请认真填写电话!");
return false;
}
if (checkspace(document.userinfo.address.value)) {
document.userinfo.address.focus();
alert("请认真填写地址!");
return false;
}
if (checkspace(document.userinfo.zhifu.value)) {
document.userinfo.zhifu.focus();
alert("请认真填写支付方式!");
return false;
}
if (checkspace(document.userinfo.shangpin.value)) {
document.userinfo.shangpin.focus();
alert("请认真填写主商品!");
return false;
}
//if(checkspace(document.userinfo.wuliu.value)) {
// document.userinfo.wuliu.focus();
// alert("请认真填写物流!");
// return false;
// }
//
//
// if(checkspace(document.userinfo.danhao.value)) {
// document.userinfo.danhao.focus();
// alert("请认真填写物流单号!");
// return false;
// }
if (checkspace(document.userinfo.zongjia.value)) {
document.userinfo.zongjia.focus();
alert("请认真填写总价!");
return false;
}
//========================================
setTimeout(function () { document.userinfo.Submit.disabled = true; }, 100);//
//========================================
}
function checkspace(checkstr) {
var str = '';
for (i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}function my_submit(){ document.form1.submit(); document.form1.submit1.disabled=true; }
把这个跟上面的、function checkspace(checkstr) { var str = ''; for(i = 0; i < checkstr.length; i++) { str = str + ' '; } return (str == checkstr); }
放到这个后面不行吗