//
// 检测登录表单填写是否合法
//
function CheckLoginForm()
{
if (document.UserLogin.UserName.value == "")
{
alert("请填写您的用户名!");
document.UserLogin.UserName.focus();
return false;
}
if (document.UserLogin.Password.value == "")
{
alert("请填写您的密码!");
document.UserLogin.Password.focus();
return false;
}
UserLogin.submit();
return true;
}
//函数名:fucCheckNUM
//功能介绍:检查是否为数字
//参数说明:要检查的数字
//返回值:1为是数字,0为不是数字
function fucCheckNUM(NUM)
{
var i,j,strTemp;
strTemp = "0123456789";
if ( NUM.length == 0)
return 0
for (i = 0;i<NUM.length;i++)
{
j = strTemp.indexOf(NUM.charAt(i));
if (j == -1)
{
//说明有字符不是数字
return 0;
}
}
//说明是数字
return 1;
}
function checknum(theInput)
{
if ((fucCheckNUM(theInput.value) == 0) )
{
theInput.value = "";
//theform.newprice.focus();
return false;
}
}
function jumpTo(i){
if(i == 1){
this.document.location = "<%=thisUrl%>";}
if(i == 2){
this.document.location = "<%=thisUrl%>&page=<%=page-1%>";}
if(i == 3){
this.document.location = "<%=thisUrl%>&page=<%=page+1%>";}
if(i == 4){
this.document.location = "<%=thisUrl%>&page=<%=rsObj.pageCount%>";}
}
//-->
function clean(){
if (confirm("确定要清空购物车?") == 1){
window.location.href = "shopCart.asp?clear=yes"}
}
function checkNumNull(theform) {
if (theform.value == "") {
alert("请填写购买书的数量");
//theform.newprice.focus();
theform.focus();
return false;
}
}
//-->
//函数名:chksafe
//功能介绍:检查是否含有"'",'\\',"/"
//参数说明:要检查的字符串
//返回值:0:是 1:不是
function chksafe(a)
{
return 1;
/* fibdn = new Array ("'" ,"\\", "、", ",", ";", "/");
i = fibdn.length;
j = a.length;
for (ii = 0;ii<i;ii++)
{ for (jj = 0;jj<j;jj++)
{ temp1 = a.charAt(jj);
temp2 = fibdn[ii];
if (tem';p1 == temp2)
{ return 0; }
}
}
return 1;
*/
}
//函数名:chkemail
//功能介绍:检查是否为Email Address
//参数说明:要检查的字符串
//返回值:0:不是 1:是
function chkemail(a)
{ var i = a.length;
var temp = a.indexOf('@');
var tempd = a.indexOf('.');
if (temp > 1) {
if ((i-temp) > 3){
if ((i-tempd)>0){
return 1;
}
}
}
return 0;
}
//函数名:fucPWDchk
//功能介绍:检查是否含有非数字或字母
//参数说明:要检查的字符串
//返回值:0:含有 1:全部为数字或字母
function fucPWDchk(str)
{
var strSource = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
var ch;
var i;
var temp;
for (i = 0;i<= (str.length-1);i++)
{
ch = str.charAt(i);
temp = strSource.indexOf(ch);
if (temp == -1)
{
return 0;
}
}
if (strSource.indexOf(ch) == -1)
{
return 0;
}
else
{
return 1;
}
}
//函数名:fucCheckNUM
//功能介绍:检查是否为数字
//参数说明:要检查的数字
//返回值:1为是数字,0为不是数字
function fucCheckNUM(NUM)
{
var i,j,strTemp;
strTemp = "0123456789";
if ( NUM.length == 0)
return 0
for (i = 0;i<NUM.length;i++)
{
j = strTemp.indexOf(NUM.charAt(i));
if (j == -1)
{
//说明有字符不是数字
return 0;
}
}
//说明是数字
return 1;
}
//函数名:chkspc
//功能介绍:检查是否含有空格
//参数说明:要检查的字符串
//返回值:0:是 1:不是
function chkspc(a)
{
var i = a.length;
var j = 0;
var k = 0;
while (k<i)
{
if (a.charAt(k) != " ")
j = j+1;
k = k+1;
}
if (j == 0)
{
return 0;
}
if (i!= j)
{ return 2; }
else
{
return 1;
}
}
//函数名:fucCheckTEL
//功能介绍:检查是否为电话号码
//参数说明:要检查的字符串
//返回值:1为是合法,0为不合法
function fucCheckTEL(TEL)
{
var i,j,strTemp;
strTemp = "0123456789-()# ";
for (i = 0;i<TEL.length;i++)
{
j = strTemp.indexOf(TEL.charAt(i));
if (j == -1)
{
//说明有字符不合法
return 0;
}
}
//说明合法
return 1;
}
//函数名:fucCheckLength
//功能介绍:检查字符串的长度
//参数说明:要检查的字符串
//返回值:长度值
function fucCheckLength(strTemp)
{
var i,sum;
sum = 0;
for(i = 0;i<strTemp.length;i++)
{
if ((strTemp.charCodeAt(i)>= 0) && (strTemp.charCodeAt(i)<= 255))
sum = sum+1;
else
sum = sum+2;
}
return sum;
}
function form1_onsubmit()
{
if (chkspc(document.form1.name.value) == 0)
{ alert("请填写您的姓名。");
document.form1.name.focus();
return false;
}
if ((window.form1.sex[0].checked == 0) && (window.form1.sex[1].checked == 0 ))
{ alert("请选择您的性别。");
return false;
}
if ((chksafe(document.form1.name.value) == 0)||(fucCheckLength(document.form1.name.value)>20))
{ alert("请填写正确的姓名。");
document.form1.name.focus();
return false;
}
if (fucCheckLength(document.form1.pwd.value)<4)
{ alert("密码必须大于4位")
document.form1.pwd.focus();
return false;
}
if ((chksafe(document.form1.pwd.value) == 0)||(fucCheckLength(document.form1.pwd.value)>18))
{ alert("请填写正确密码。")
document.form1.pwd.focus();
return false;
}
if (document.form1.PasswordConfirm.value!= document.form1.pwd.value)
{
alert ("请确认您的密码。");
document.form1.PasswordConfirm.value = '';
document.form1.pwd.value = '';
document.form1.pwd.focus();
return false;
}
if (chkspc(document.form1.question.value) == 0)
{ alert("请填写您的密码提问。");
document.form1.question.focus();
return false;
}
if ((chksafe(document.form1.question.value) == 0)||(fucCheckLength(document.form1.question.value)>50))
{ alert("请填写正确的密码提问。");
document.form1.question.focus();
return false;
}
if (fucCheckLength(document.form1.answer.value)<4)
{ alert("提示问题答案必须大于4位")
document.form1.answer.focus();
return false;
}
if (chkspc(document.form1.answer.value) == 0)
{ alert("请填写密码提示问题答案。");
document.form1.answer.focus();
return false;
}
if ((chksafe(document.form1.answer.value) == 0)||(fucCheckLength(document.form1.answer.value)>50))
{ alert("请填写正确的密码提示问题答案。");
document.form1.answer.focus();
return false;
}
if ((chkspc(document.form1.email.value) == 0) || (chkemail(document.form1.email.value) == 0))
{ alert ("请填写正确的e-mail地址。");
document.form1.email.focus();
return false;
}
if ((chksafe(document.form1.email.value) == 0)||(fucCheckLength(document.form1.email.value)>40))
{ alert ("请填写正确的e-mail地址。");
document.form1.email.focus();
return false;
}
if ((document.form1.phone.value == '') || (chkspc(document.form1.phone.value) == 0) || (fucCheckLength(document.form1.phone.value)>30)||(fucCheckTEL(document.form1.phone.value) == 0))
{
alert("您的常用电话号码填写有误。");
document.form1.phone.focus();
return false;
}
if (chkspc(document.form1.address.value) == 0)
{ alert ("请填写您的收货地址。");
document.form1.address.focus();
return false;
}
if ((chksafe(document.form1.address.value) == 0)||(fucCheckLength(document.form1.address.value)>200))
{ alert ("请填写正确的收货地址。");
document.form1.address.focus();
return false;
}
if (chkspc(document.form1.zipcode.value) == 0)
{ alert ("请您填写邮政编码。");
document.form1.zipcode.focus();
return false;
}
if ((chksafe(document.form1.zipcode.value) == 0)||(fucCheckLength(document.form1.zipcode.value)>15))
{ alert ("请填写正确的邮政编码。");
document.form1.zipcode.focus();
return false;
}
for (lgth = 0;lgth<= document.form1.pwd.value.length;lgth++)
{ if ( (document.form1.pwd.value.charCodeAt(lgth)>128) || (document.form1.pwd.value.charAt(lgth) == "'") )
{ alert("请不要输入中文密码或者单引号!");
document.form1.pwd.focus();
return false;
}
}
}
function checkMe(theForm){
if(theForm.name.value == ""){
alert("错!名称不能为空!");
return false;
}
没有合适的资源?快使用搜索试试~ 我知道了~
逍遥网上书店(asp+access)
共143个文件
asp:101个
gif:28个
js:4个
4星 · 超过85%的资源 需积分: 9 45 下载量 114 浏览量
2008-12-29
19:06:13
上传
评论
收藏 337KB RAR 举报
温馨提示
逍遥网上书店(asp+access)~~~~~
资源推荐
资源详情
资源评论
收起资源包目录
逍遥网上书店(asp+access) (143个子文件)
rgUserInfo.asp 9KB
regUserInfo.asp 9KB
productbase.asp 9KB
productList.asp 8KB
memInfo.asp 7KB
ShowSpecialProduct.asp 6KB
pyOrderInfo.asp 6KB
payOrderInfo.asp 6KB
orderProcess.asp 6KB
orderInfo.asp 6KB
treatedView.asp 5KB
cartbase.asp 5KB
rgUserSucess.asp 5KB
regUserSucess.asp 5KB
pyCusInfo.asp 5KB
payCusInfo.asp 5KB
manuList.asp 5KB
pySucInfo.asp 5KB
memModify.asp 4KB
paySucInfo.asp 4KB
orderList.asp 4KB
treatedList.asp 4KB
memberbase.asp 4KB
memberList.asp 4KB
proModify.asp 4KB
proAdd.asp 3KB
shopcart.asp 3KB
faqList.asp 3KB
ProductSearchForm.asp 3KB
faqbase.asp 3KB
userModify.asp 3KB
userList.asp 3KB
adminbase.asp 3KB
default.asp 3KB
product.asp 3KB
fpCheckAnswer.asp 2KB
head.asp 2KB
faq.asp 2KB
userAdd.asp 2KB
fpInputAnswer.asp 2KB
manuAdd.asp 2KB
faqModify.asp 2KB
rgUserName.asp 2KB
head.asp 2KB
regUserName.asp 2KB
pageguide.asp 2KB
ordersearch.asp 2KB
memModifySave.asp 2KB
faqDetail.asp 2KB
memSave.asp 2KB
payStep2.asp 2KB
payStep3.asp 2KB
payStep1.asp 2KB
fpInputName.asp 2KB
ProductDetail.asp 2KB
regStep3.asp 1KB
regStep1.asp 1KB
memModify.asp 1KB
ProductTypeList.asp 1KB
userAddSave.asp 1KB
manuDel.asp 1KB
left.asp 1KB
findPwdStep1.asp 1KB
proModifySave.asp 1KB
proAddPic.asp 1KB
regStep2.asp 1KB
ProductTypeBase.asp 1KB
findPwdStep2.asp 1KB
findPwdStep3.asp 1KB
userModifySave.asp 1KB
proAddSave.asp 1KB
faqAdd.asp 1KB
main.asp 1KB
login.asp 1KB
proAddPicSave.asp 1KB
conndb.asp 1KB
template.asp 1021B
login.asp 1013B
userDel.asp 873B
default.asp 859B
faqModifySave.asp 854B
manuModifySave.asp 829B
orderProcessSave.asp 812B
faqAddSave.asp 764B
manuAddSave.asp 722B
proRecommend.asp 718B
test.asp 717B
conndb.asp 632B
foot.asp 623B
proDel.asp 620B
foot.asp 589B
config.asp 582B
config.asp 581B
memDel.asp 391B
faqDel.asp 366B
orderDel.asp 365B
sysbase.asp 205B
checkuser.asp 110B
sysbase.asp 102B
logout.asp 71B
共 143 条
- 1
- 2
资源评论
- 「已注销」2012-07-15下来模仿学习的~界面有些挫~
winskygod
- 粉丝: 4
- 资源: 37
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功