账号通
    

账号  

密码  

1302

查看

1

回复
主题:[求助]制作表单后,如何让姓名不能重复输入。。。谢谢 [收藏主题]  
qq2334532 当前离线

50

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:380 分
登录次数:65 次
注册时间:2008/12/22
最后登录:2016/7/13
qq2334532 发表于:2016/7/13 15:57:30   | 只看该作者 查看该作者主题 楼主 
科汛在线考试系统(NET)
<iframe src="about:blank" name="hidform1" style="width:0px;height:0px;display:none"></iframe> <script src="/ks_inc/common.js"></script> <script src="/ks_inc/form_ck.js"></script> <form name="myform1" action="/plus/form/form.asp" target="hidform1" method="post"> <table width="100%" border="0" cellspacing="2" cellpadding="1"> <input type="hidden" value="Save" name="action"/> <input type="hidden" value="1" name="id"/> <input type="hidden" value="{$ChannelID}" name="m"/> <input type="hidden" value="{$InfoID}" name="d"/> <input type="hidden" value="{$ToUserName}" id="tousername" name="tousername"/> <tr class="tdbg"> <td align="right" class="lefttdbg">姓名:</td> <td><input type="text" maxlength="255" class="upfile" style="width:200px" id="KS_xm" name="KS_xm" value=""> </td> </tr> <tr><td colspan="2" class="subtdbg" align="center"><input type="submit" value="确认提交" name="submit1"></td></tr> </table> </form>
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
anflash 当前离线

209

主题

2

广播

36

粉丝
添加关注
级别:二年级

用户积分:1082 分
登录次数:630 次
注册时间:2011/12/22
最后登录:2024/6/20
anflash 发表于:2016/7/13 16:46:49   | 只看该作者 查看该作者主题 沙发 
做在线知识付费 选科汛云开店

修改文件:/plus/form/form.asp


s_content="<table border=0 cellpadding=0 cellspacing=0>" & vbcrlf
for k=0 to ubound(sql,2)
if sql(2,k)=1 and KS.S(sql(0,k))="" then call Alert(sql(1,k) & "必须填写!"):exit sub

If sql(0,k)="KS_xm" Then
If Not conn.execute("sel ect top 1 id from "& TableName &" where "& sql(0,k) &"='"& KS.S(sql(0,k)) &"'").Eof Then
Alert(sql(1,k) & "不能重复!"):exit sub
End If
End If

select case sql(3,k)
case 8
If Not KS.IsValidEmail(KS.S(sql(0,k))) Then  Call Alert("Email格式不正确!"):Exit Sub
email=KS.S(sql(0,k))
case 4
If Not isnumeric(KS.S(sql(0,k))) and sql(2,k)=1 Then  Call Alert("数字格式不正确!"):Exit Sub
case 5
If Not ISDate(KS.S(sql(0,k))) Then  Call Alert(sql(1,k) &"格式不正确!"):Exit Sub
end select
s_content=s_content &"<tr>" & vbcrlf


备注:红色为增加部分,“sel ect”中间的空格去掉

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.08594秒 powered by KesionCMS 9.0