例如,看下面的例子.我是在客户端进行验证的,我直接点击"提交",接着弹出提示没输入,我按"确定",结果还是转到后面的页面去了! 输入表单页面!(2.asp) <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档 </title> </head> <script language="vbscript"> <!-- sub checkdata() if form.name.value="" then window.alert "用户名错误!" exit sub end if form.submit end sub