网站首页
|
学员作品
|
平面设计
|
办公软件
|
网络教程
|
硬件教程
|
电脑入门
|
网络安全
|
ASP教程
|
网页设计
|
>>您所在的位置:腾飞电脑学校>>腾飞教程 > 网页设计
ASP表单验证
文章来源:腾飞电脑学校 发布时间:2009-03-11 阅读次数:
19611
次
<script language='javascript'>
function checkform(){
if(document.forma.name.value==''){
alert('请填写您的姓名!!');
document.forma.name.focus();
return false;
}
if(document.forma.tel.value==''){
alert('请填写您的联系电话!!');
document.forma.tel.focus();
return false;
}
if(document.forma.number.value==''){
alert('请填写您的订购数量!!');
document.forma.number.focus();
return false;
}
if(document.forma.email.value!="@"){
if(document.forma.email.value.indexOf("@") == -1 || document.forma.email.value.indexOf(".") == -1){
alert('请填写一个正确的E-Mail');
document.forma.email.focus();
return false;
}
}
if(document.forma.address.value==''){
alert('请填写您的收货地址!!');
document.forma.address.focus();
return false;
}
return true;
}
</script>
<form method=post action='save.asp' name=forma onsubmit='return checkform();'>
管理入口
| 下载中心 | 招聘英才 | 联系我们 | 学校地图 | 网上留言
南充腾飞电脑培训学校 版权所有(C) 电话:0817-3369775
学校地址:四川省南充市模范街54号(钟表老字号眼镜行2楼)
联系人:王小平 电子邮件:wangandhe@163.com QQ:306389845
本站网络实名:南充电脑学校 南充电脑培训学校 南充计算机培训学校