想问一下input type="hidden"是做什么用的?

来源:百度知道 编辑:UC知道 时间:2024/05/06 10:42:31
麻烦帮我解释一下,我看不懂!!

<%@Language=VBScript%>
<%
Response.Buffer=true //设置输出缓存,用于显示不同页面。
On error resume next
If Request.ServerVariables("Request_Method")="GET" then
// 判断客户是以什么方式请求 WEB 页面
//------------------------
// 客户登陆界面
//------------------------
%>
<form method="POST" action="chat.asp"><p>
<input type="text" name="nick" size="20" value="nick" style="background-color: rgb(192,192,192)"><br>
<input type="submit" value="进入聊天室" name="B1" style="color: rgb(255,255,0); font-size: 9pt; background-color: rgb(0,128,128)">
<p><input type="hidden" name="log" size="20" value="1"><br></p>
</form>
<%
Response.End
//终止其后的程序
Else
Response.clear
//清空上

Input表示Form表单中的一种输入对象,其又随Type类型的不同而分文本输入框,密码输入框,单选/复选框,提交/重置按钮等,下面一一介绍。
1,type=text
输入类型是text,这是我们见的最多也是使用最多的,比如登陆输入用户名,注册输入电话号码,电子邮件,家庭住址等等。当然这也是Input的默认类型。
参数name:同样是表示的该文本输入框名称。
参数size:输入框的长度大小。
参数maxlength:输入框中允许输入字符的最大数。
参数value:输入框中的默认值
特殊参数readonly:表示该框中只能显示,不能添加修改。

<form>
your name:
<input type="text" name="yourname" size="30" maxlength="20" value="输入框的长度为30,允许最大字符数为20"><br>
<input type="text" name="yourname" size="30" maxlength="20" readonly value="你只能读不能修改">
</form>
2,type=password
不用我说,一看就明白的密码输入框,最大的区别就是当在此输入框输入信息时显示为保密字符。
参数和“type=text”相类似。
<form>
your password:
<input type="password" name="yourpwd" size="20" maxlength="15" value="123456">密码长度小于15
</form>
3,type=file