注册 登录
编程论坛 ASP技术论坛

麻烦写个IF语句

kf6tai 发布于 2010-11-01 20:15, 359 次点击
望高手能帮忙写个ASP的IF程序,就是我首页只有一个文本框,如果输入的内容为123456,才会继续显示该网页下面的内容,否则,提示关闭该网页,谢谢,麻烦详细点
1 回复
#2
yms1232010-11-01 23:31
程序代码:
<html>
<head>
<script language="javascript">
function form1_Click()
{
    document.form1.action
=self.location.href;//设置表单提交地址为当前页
    document.form1.target="_self";//提交到当前窗口
    document.form1.submit();//提交表单
}
</script>
</head>
<body>
   <form name="form1" method="post">
       <input type="text" name="Txt1" ><input type="button" name="Btn1" onClick="form1_Submit()"  value="提交">
   </form>
<%
     
IF Request.Form("Txt1")="123456" Then
         
'这里写要显示的内容
    End IF
%>
</body>
</html>
1