DREAMWEAVER作论坛必添项提示怎么作?

来源:百度知道 编辑:UC知道 时间:2024/05/21 15:05:01
留言板的必添项和论坛的必添项怎么作?就是论坛注册时必需写的东西,如果他没写,在按提交的时候怎么提示他哪个没有写,还有留言板留言时的标题和其它的内容不写怎么提示需要哪些价码.注册用户时添写用户名怎么自动提示可用不可用?
谁能说的明白跟我讲一下吧,应该加什么样的代码或者要作什么样的数据库讲一下,谢谢了.
function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || ma

用IF函数判断呀

这些都是后台数据库处理的吧

必添项:

这个要用到JAVASCRIPT的脚本语言,不能为空,是要自己写代码的。
例如写一个函数
if(你的控件名=="")
alert('不能为空')
else if.............
你自己写吧。
应该是一个ONCLICK事件

用IF函数判断呀
<%
function Accuss

response.write "<br>报名成功!请等待本站的回复.<br>"

if len(mingzi)>0 then
response.write "<br>您的姓名:"&server.htmlencode(replace(mingzi,"''","'"))
end if
if len(danwei)>0 then
response.write "<br>文化程度:<strong>"&server.htmlencode(replace(danwei,"''","'"))&"</strong>"
end if
if len(dianhua)>0 then
response.write "<br>您的电话:"&server.htmlencode(replace(dianhua,"''","'"))&"</a>"
end if
if len(youjian)>0 then
response.write