📄 0041.htm
字号:
<html>
<head>
<title>新时代软件教程:操作系统 主页制作 服务器 设计软件 网络技术 编程语言 文字编辑</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
body, table {font-size: 9pt; font-family: 宋体}
a {text-decoration:none}
a:hover {color: red;text-decoration:underline}
.1 {background-color: rgb(245,245,245)}
-->
</style>
</head>
<p align="center"><script src="../../1.js"></script></a>
<p align="center"><big><strong>表单</strong></big></p>
<div align="right">---摘自《网页设计师》</div>
<font color="#008000">◇ 基本语法</font>
<p>
表单的基本语法
<dl>
<tt><form action="url" method=*><br>
...<br>
...<br>
<input type=submit> <input type=reset><br>
</form></tt>
<p><tt>*=GET, POST</tt></p>
</dl>
<p> </p>
<p><!------Input Basic------->
</p>
表单中提供给用户的输入形式
<dl>
<tt><input type=* name=**></tt>
<p><tt>*=text, password, checkbox, radio, image, hidden, submit, reset</tt></p>
<p><tt>**=Symbolic Name for CGI script</tt></p>
</dl>
<p> </p>
<p><!--################## Text & Passwd ########################-->
<a name="text"></a></p>
<font color="#008000">◇ 文字输入和密码输入</font>
<p><!------Text & Password------->
<tt>*=text, password</tt></p>
<input type=*><br>
<input type=* value=**>
<pre><form action=/cgi-bin/post-query method=POST>
您的姓名:
<input type=text name=姓名><br>
您的主页的网址:
<input type=text name=网址 value=http://><br>
密码:
<input type=password name=密码><br>
<input type=submit value="发送"><input type=reset value="重设">
</form>
</pre>
<p> </p>
<form action="../cgi-bin/post-query" method="post">
<p>您的姓名: <input name="姓名" size="20"><br>
您的主页的网址: <input name="网址" value="http://" size="20"><br>
密码: <input name="密码" type="password" value size="20"><br>
<input type="submit" value="发送"><input type="reset" value="重设"></p>
</form>
<p> </p>
<p><!------Text & Password -- Size, Max ------->
</p>
<input type=* size=**><br>
<input type=* maxlength=**>
<pre><form action=/cgi-bin/post-query method=POST>
<input type=text name=a01 size=40><br>
<input type=text name=a02 maxlength=5><br>
<input type=submit><input type=reset>
</form>
</pre>
<p> </p>
<form action="../cgi-bin/post-query" method="post">
<p><input name="a01" size="40"><br>
<input maxLength="5" name="a02" size="20"><br>
<input type="submit" value="提交查询内容"><input type="reset" value="重置"></p>
</form>
<p> </p>
<p><!--################## Checkbox & Radio ########################-->
<a name="check"></a></p>
<font color="#008000">◇ 复选框(Checkbox) 和 单选框(RadioButton)</font>
<p><!------Checkbox------->
</p>
<input type=checkbox><br>
<input type=checkbox checked><br>
<input type=checkbox value=**>
<pre><form action=/cgi-bin/post-query method=POST>
<input type=checkbox name=水果1>
Banana<p>
<input type=checkbox name=水果2 checked>
Apple<p>
<input type=checkbox name=水果3 value=橘子>
Orange<p>
<input type=submit><input type=reset>
</form>
</pre>
<p> </p>
<form action="../cgi-bin/post-query" method="post">
<p><input name="水果1" type="checkbox" value="ON">Banana</p>
<p><input CHECKED name="水果2" type="checkbox" value="ON">Apple</p>
<p><input name="水果3" type="checkbox" value="橘子">Orange</p>
<p><input type="submit" value="提交查询内容"><input type="reset" value="重置"></p>
</form>
<p> </p>
<p><!------Checkbox------->
</p>
<input type=radio value=**><br>
<input type=radio value=** checked>
<pre><form action=/cgi-bin/post-query method=POST>
<input type=radio name=水果>
Banana<p>
<input type=radio name=水果 checked>
Apple<p>
<input type=radio name=水果 value=橘子>
Orange<p>
<input type=submit><input type=reset>
</form>
</pre>
<p> </p>
<form action="../cgi-bin/post-query" method="post">
<p><input name="水果" type="radio">Banana</p>
<p><input CHECKED name="水果" type="radio">Apple</p>
<p><input name="水果" type="radio" value="橘子">Orange</p>
<p><input type="submit" value="提交查询内容"><input type="reset" value="重置"></p>
</form>
<p> </p>
<p><!--################## Image ########################-->
<a name="image"></a></p>
<font color="#008000">◇ 图象坐标</font>
<p><b>在下面选则一个系数后,在图象上点一下,就知道什么是图象坐标了!</b></p>
<input type=image src=url>
<pre><form action=/cgi-bin/post-query method=POST>
<input type=image name=face src=f.gif><p>
<input type=radio name=zoom value=2 checked>x2
<input type=radio name=zoom value=4>x4
<input type=radio name=zoom value=6>x6<p>
<input type=reset>
</form>
</pre>
<p> </p>
<form action="../cgi-bin/post-query" method="post">
<p><input height="64" name="face" src="f.gif" type="image" width="64"></p>
<p><input CHECKED name="zoom" type="radio" value="2">x2 <input name="zoom" type="radio" value="4">x4
<input name="zoom" type="radio" value="6">x6</p>
<p><input type="reset" value="重置"></p>
</form>
<p> </p>
<p><!--################## Hidden ########################-->
<a name="hide"></a></p>
<font color="#008000">◇ 隐藏表单的元素</font>
<p>
<input type=hidden value=*></p>
<pre><form action=/cgi-bin/post-query method=POST>
<input type=hidden name=add value=hoge@hoge.jp>
Here is a hidden element. <p>
<input type=submit><input type=reset>
</form>
</pre>
<p> </p>
<form action="../cgi-bin/post-query" method="post">
<input name="add" type="hidden" value="hoge@hoge.jp">
<p>Here is a hidden element.</p>
<p><input type="submit" value="提交查询内容"><input type="reset" value="重置"></p>
</form>
<p> </p>
<p><!--################## Select ########################-->
<a name="select"></a></p>
<font color="#008000">◇ 列表框(Selectable Menu)</font>
<p><!------Basic------->
</p>
基本语法
<dl>
<select name=*><br>
<option> ...<br>
</select>
</dl>
<p><!------select & option------->
</p>
<option selected><br>
<option value=**>
<pre><form action=/cgi-bin/post-query method=POST>
<select name=fruits>
<option>Banana
<option selected>Apple
<option value=My_Favorite>Orange
</select><p>
<input type=submit><input type=reset>
</form>
</pre>
<p> </p>
<form action="../cgi-bin/post-query" method="post">
<p><select name="fruits" size="1">
<option>Banana</option>
<option selected>Apple</option>
<option value="My_Favorite">Orange</option>
</select></p>
<p><input type="submit" value="提交查询内容"><input type="reset" value="重置"></p>
</form>
<p> </p>
<p><!------size & multiple------->
</p>
<select size=**>
<pre><form action=/cgi-bin/post-query method=POST>
<select name=fruits size=3>
<option>Banana
<option selected>Apple
<option value=My_Favorite>Orange
<option>Peach
</select><p>
<input type=submit><input type=reset>
</form>
</pre>
<p> </p>
<form action="../cgi-bin/post-query" method="post">
<p><select name="fruits" size="3">
<option>Banana</option>
<option selected>Apple</option>
<option value="My_Favorite">Orange</option>
<option>Peach</option>
</select></p>
<p><input type="submit" value="提交查询内容"><input type="reset" value="重置"></p>
</form>
<p><!------multiple------->
</p>
<select size=** multiple>
<b>
<p>注意,是用 Ctrl 键配合鼠标实现多选。<br>
(和 MS-WINDOWS 的 File Manager 一样)</b></p>
<pre><form action=/cgi-bin/post-query method=POST>
<select name=fruits size=3 multiple>
<option selected>Banana
<option selected>Apple
<option value=My_Favorite>Orange
<option selected>Peach
</select><p>
<input type=submit><input type=reset>
</form>
</pre>
<form action="../cgi-bin/post-query" method="post">
<p><select multiple name="fruits" size="3">
<option selected>Banana</option>
<option selected>Apple</option>
<option value="My_Favorite">Orange</option>
<option selected>Peach</option>
</select></p>
<p><input type="submit" value="提交查询内容"><input type="reset" value="重置"></p>
</form>
<p> </p>
<font color="#008000">◇ 文本区域 </font>
<p>
<textarea name=* rows=** cols=**> ... <textarea></p>
<pre><form action=/cgi-bin/post-query method=POST>
<textarea name=comment rows=5 cols=60>
</textarea>
<P>
<input type=submit><input type=reset>
</form>
</pre>
<p> </p>
<form action="../cgi-bin/post-query" method="post">
<p><textarea cols="60" name="comment" rows="5"></textarea></p>
<p><input type="submit" value="提交查询内容"><input type="reset" value="重置"></p>
</form>
<p> </p>
<p><!------Word Wrapping Off------->
<a name="wrap"></a>对于很长的行是否进行换行的设置(Word
Wrapping) <img alt="netscape.gif (168 bytes)" height="14" src="images/netscape.gif" width="80"></p>
<textarea wrap=off> ... </textarea>
<dl>
<dd>不换行,是缺省设置。</dd>
</dl>
<p><!------Word Wrapping Soft------->
<textarea wrap=soft> ... </textarea></p>
<p>“软换行”,好象 MS-WORD 里的“软回车”。
<dl>
<dd><tt><form action=/cgi-bin/post-query method=POST><br>
<textarea wrap=soft name=comment rows=5 cols=25>
</textarea><P><br>
<input type=submit><input type=reset><br>
</form></tt><br>
</dd>
</dl>
<p> </p>
<form action="../cgi-bin/post-query" method="post">
<p><textarea cols="25" name="comment" rows="5"></textarea></p>
<p><input type="submit" value="提交查询内容"><input type="reset" value="重置"></p>
</form>
<p><!------Word Wrapping Hard------->
</p>
<textarea wrap=hard> ... </textarea>
<p>“硬换行”,好象 MS-WORD 里的“硬回车”。
<dl>
<dd><tt><form action=../cgi-bin/post-query method=POST><br>
<textarea wrap=hard name=comment rows=5 cols=25>
</textarea><P><br>
<input type=submit><input type=reset><br>
</form></tt><br>
</dd>
</dl>
<p> </p>
<form action="../cgi-bin/post-query" method="post">
<p><textarea cols="25" name="comment" rows="5" wrap="hard"></textarea></p>
<p><input type="submit" value="提交查询内容"><input type="reset" value="重置"></p>
</form>
<p> </p>
<p>(未完,请继续)
</table>
<p align="center"><script src="../../2.js"></script></a>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -