查看: 750|回复: 4
|
asp 编写 error message 的问题
[复制链接]
|
|
当我run page的时候它会先run page的validation,要怎样才可以让它第一次的时候不run validation?
<form action="abc.asp"method="post">
<input type="text" name="a">
<input type="submit" name="submit">
<%
if request.form("a")="" then
response.write("hello")
end if
%>
我要第二次才display 'hello'因为不可能才刚跑就出error message.
[ 本帖最后由 城之内 于 15-3-2006 09:39 AM 编辑 ] |
|
|
|
|
|
|
|
发表于 14-3-2006 05:03 PM
|
显示全部楼层
你已经POST了。。所以A肯定拿到"",然后出现HELLO。。 |
|
|
|
|
|
|
|

楼主 |
发表于 15-3-2006 09:21 AM
|
显示全部楼层
原帖由 max5007 于 14-3-2006 05:03 PM 发表
你已经POST了。。所以A肯定拿到"",然后出现HELLO。。
那要怎么办?没可能一开就出error message吧,user都还没打字下去 |
|
|
|
|
|
|
|
发表于 15-3-2006 03:33 PM
|
显示全部楼层
原帖由 城之内 于 15-3-2006 09:21 AM 发表
那要怎么办?没可能一开就出error message吧,user都还没打字下去
试试看:
- if request.form("a")="" and request.form("submit")<>"" then
- response.write("hello")
- end if
复制代码 |
|
|
|
|
|
|
|

楼主 |
发表于 16-3-2006 04:59 PM
|
显示全部楼层
原帖由 Sirius 于 15-3-2006 03:33 PM 发表
试试看:
- if request.form("a")="" and request.form("submit")<>"" then
- response.write("hello")
- end if
复制代码
谢谢你!!!弄到了. |
|
|
|
|
|
|
| |
本周最热论坛帖子
|