⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form.html

📁 这是一套好教材哦
💻 HTML
字号:
<html>
<head>
   <title>黄金书屋 - INTERNET 教室 - HTML 语言教程</title>
</head>
<body>

<h1 ALIGN="CENTER">表单(FORM)标记(TAGS)</h1>

<center><p>
<hr></p></center>

<p><!--################## Basic ########################--><a NAME="basic"></a></p>

<h2><img SRC="br20t.gif" tppabs="http://www.yessir.net/html/br20t.gif" ALT="+" HEIGHT="20" WIDTH="20" ALIGN="TOP"> 基本语法</h2>

<p><!------Form Basic-------></p>

<h3>表单的基本语法</h3>

<dl>
<h3><tt>&lt;form action=&quot;url&quot; method=*&gt;<br>
... <br>
... <br>
&lt;input type=submit&gt; &lt;input type=reset&gt;<br>
&lt;/form&gt; </tt></h3>

<p><tt>*=GET, POST </tt></p>
</dl>

<pre>
</pre>

<p><!------Input Basic-------></p>

<h3>表单中提供给用户的输入形式</h3>

<dl>
<h3><tt>&lt;input type=* name=**&gt;</tt></h3>

<p><tt>*=text, password, checkbox, radio, image, hidden, submit, reset</tt></p>

<p><tt> **=Symbolic Name for CGI script </tt></p>
</dl>

<pre>
</pre>

<p><!--################## Text & Passwd ########################--><a NAME="text"></a></p>

<h2><img SRC="br20t.gif" tppabs="http://www.yessir.net/html/br20t.gif" ALT="+" HEIGHT="20" WIDTH="20" ALIGN="TOP"> 文字输入和密码输入</h2>

<p><!------Text & Password-------><tt>*=text, password</tt> </p>

<h3>&lt;input type=*&gt;<br>
&lt;input type=* value=**&gt;</h3>

<pre>&lt;form action=/cgi-bin/post-query method=POST&gt;
您的姓名: 
&lt;input type=text name=姓名&gt;&lt;br&gt;
您的主页的网址: 
&lt;input type=text name=网址 value=http://&gt;&lt;br&gt;
密码: 
&lt;input type=password name=密码&gt;&lt;br&gt;
&lt;input type=submit value=&quot;发送&quot;&gt;&lt;input type=reset value=&quot;重设&quot;&gt;
&lt;/form&gt;

</pre>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/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></p>

<pre>
</pre>

<p><!------Text & Password -- Size, Max -------></p>

<h3>&lt;input type=* size=**&gt;<br>
&lt;input type=* maxlength=**&gt;</h3>

<pre>&lt;form action=/cgi-bin/post-query method=POST&gt;
&lt;input type=text name=a01 size=40&gt;&lt;br&gt;
&lt;input type=text name=a02 maxlength=5&gt;&lt;br&gt;
&lt;input type=submit&gt;&lt;input type=reset&gt;
&lt;/form&gt;

</pre>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/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></p>

<pre>
</pre>

<p><!--################## Checkbox & Radio ########################--><a NAME="check"></a></p>

<h2><img SRC="br20t.gif" tppabs="http://www.yessir.net/html/br20t.gif" ALT="+" HEIGHT="20" WIDTH="20" ALIGN="TOP"> 复选框(Checkbox) 和 单选框(RadioButton) </h2>

<p><!------Checkbox-------></p>

<h3>&lt;input type=checkbox&gt;<br>
&lt;input type=checkbox checked&gt;<br>
&lt;input type=checkbox value=**&gt;</h3>

<pre>&lt;form action=/cgi-bin/post-query method=POST&gt;
&lt;input type=checkbox name=水果1&gt;
        Banana&lt;p&gt;
&lt;input type=checkbox name=水果2 checked&gt;
        Apple&lt;p&gt;
&lt;input type=checkbox name=水果3 value=橘子&gt;
        Orange&lt;p&gt;
&lt;input type=submit&gt;&lt;input type=reset&gt;
&lt;/form&gt;

</pre>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/cgi-bin/post-query" method="POST">
<input type="checkbox" name="水果1">Banana</p>

<p> <input type="checkbox" name="水果2" checked>Apple</p>

<p> <input type="checkbox" name="水果3" value="橘子">Orange</p>

<p> <input type="submit"><input type="reset"></form></p>

<pre>
</pre>

<p><!------Checkbox-------></p>

<h3>&lt;input type=radio value=**&gt;<br>
&lt;input type=radio value=** checked&gt;</h3>

<pre>
&lt;form action=/cgi-bin/post-query method=POST&gt;
&lt;input type=radio name=水果&gt;
        Banana&lt;p&gt;
&lt;input type=radio name=水果 checked&gt;
        Apple&lt;p&gt;
&lt;input type=radio name=水果 value=橘子&gt;
        Orange&lt;p&gt;
&lt;input type=submit&gt;&lt;input type=reset&gt;
&lt;/form&gt;

</pre>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/cgi-bin/post-query" method="POST">
<input type="radio" name="水果">Banana</p>

<p> <input type="radio" name="水果" checked>Apple</p>

<p> <input type="radio" name="水果" value="橘子">Orange</p>

<p> <input type="submit"><input type="reset"></form></p>

<pre>
</pre>

<p><!--################## Image ########################--><a NAME="image"></a></p>

<h2><img SRC="br20t.gif" tppabs="http://www.yessir.net/html/br20t.gif" ALT="+" HEIGHT="20" WIDTH="20" ALIGN="TOP"> 图象坐标 </h2><p>
<b>在下面选则一个系数后,在图象上点一下,就知道什么是图象坐标了!</b>


<h3>&lt;input type=image src=url&gt;</h3>

<pre>&lt;form action=/cgi-bin/post-query method=POST&gt;
&lt;input type=image name=face src=f.gif&gt;&lt;p&gt;
&lt;input type=radio name=zoom value=2 checked&gt;x2
&lt;input type=radio name=zoom value=4&gt;x4
&lt;input type=radio name=zoom value=6&gt;x6&lt;p&gt;
&lt;input type=reset&gt;
&lt;/form&gt;

</pre>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/cgi-bin/post-query" method="POST"><input type="image" src="f.gif" tppabs="http://www.yessir.net/html/f.gif" name="face" WIDTH="64" HEIGHT="64"></p>

<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>

<p> <input type="reset"></form></p>

<pre>
</pre>

<p><!--################## Hidden ########################--><a NAME="hide"></a></p>

<h2><img SRC="br20t.gif" tppabs="http://www.yessir.net/html/br20t.gif" ALT="+" HEIGHT="20" WIDTH="20" ALIGN="TOP"> 隐藏表单的元素
</h2>

<h3>&lt;input type=hidden value=*&gt;</h3>

<pre>&lt;form action=/cgi-bin/post-query method=POST&gt;
&lt;input type=hidden name=add value=hoge@hoge.jp&gt;
Here is a hidden element. &lt;p&gt;
&lt;input type=submit&gt;&lt;input type=reset&gt;
&lt;/form&gt;

</pre>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/cgi-bin/post-query" method="POST"><input type="hidden" name="add" value="hoge@hoge.jp">Here
is a hidden element. </p>

<p><input type="submit"><input type="reset"></form></p>

<pre>
</pre>

<p><!--################## Select ########################--><a NAME="select"></a></p>

<h2><img SRC="br20t.gif" tppabs="http://www.yessir.net/html/br20t.gif" ALT="+" HEIGHT="20" WIDTH="20" ALIGN="TOP"> 列表框(Selectable Menu) </h2>

<p><!------Basic-------></p>

<h3>基本语法</h3>

<dl>
<h3>&lt;select name=*&gt;<br>
&lt;option&gt; ...<br>
&lt;/select&gt; </h3>
</dl>

<p><!------select & option-------></p>

<h3>&lt;option selected&gt;<br>
&lt;option value=**&gt;</h3>

<pre>&lt;form action=/cgi-bin/post-query method=POST&gt;
&lt;select name=fruits&gt;
        &lt;option&gt;Banana
        &lt;option selected&gt;Apple
        &lt;option value=My_Favorite&gt;Orange
&lt;/select&gt;&lt;p&gt;
&lt;input type=submit&gt;&lt;input type=reset&gt;
&lt;/form&gt;

</pre>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/cgi-bin/post-query" method="POST"><select name="fruits"><option>Banana
<option selected>Apple <option value="My_Favorite">Orange </select></p>

<p><input type="submit"><input type="reset"></form></p>

<pre>
</pre>

<p><!------size & multiple-------></p>

<h3>&lt;select size=**&gt;</h3>

<pre>&lt;form action=/cgi-bin/post-query method=POST&gt;
&lt;select name=fruits size=3&gt;
        &lt;option&gt;Banana
        &lt;option selected&gt;Apple
        &lt;option value=My_Favorite&gt;Orange
        &lt;option&gt;Peach
&lt;/select&gt;&lt;p&gt;
&lt;input type=submit&gt;&lt;input type=reset&gt;
&lt;/form&gt;

</pre>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/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>

<p><input type="submit"><input type="reset"></form></p>

<pre>
</pre>

<p><!------multiple-------></p>

<h3>&lt;select size=** multiple&gt;</h3>
<b>注意,是用 Ctrl 键配合鼠标实现多选。<br>
(和 MS-WINDOWS 的 File Manager 一样)</b>

<pre>&lt;form action=/cgi-bin/post-query method=POST&gt;
&lt;select name=fruits size=3 multiple&gt;
        &lt;option selected&gt;Banana
        &lt;option selected&gt;Apple
        &lt;option value=My_Favorite&gt;Orange
        &lt;option selected&gt;Peach
&lt;/select&gt;&lt;p&gt;
&lt;input type=submit&gt;&lt;input type=reset&gt;
&lt;/form&gt;
</pre>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/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>

<p><input type="submit"><input type="reset"></form></p>

<pre>
</pre>

<p><!--################## Textarea ########################--><a NAME="textarea"></a></p>

<h2><img SRC="br20t.gif" tppabs="http://www.yessir.net/html/br20t.gif" ALT="+" HEIGHT="20" WIDTH="20" ALIGN="TOP"> 文本区域</h2>

<h3>&lt;textarea name=* rows=** cols=**&gt; ... &lt;textarea&gt;</h3>

<pre>&lt;form action=/cgi-bin/post-query method=POST&gt;
&lt;textarea name=comment rows=5 cols=60&gt;
&lt;/textarea&gt;
&lt;P&gt;
&lt;input type=submit&gt;&lt;input type=reset&gt;
&lt;/form&gt;

</pre>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/cgi-bin/post-query" method="POST"><textarea name="comment" rows="5" cols="60"></textarea></p>

<p><input type="submit"><input type="reset"></form></p>

<pre>
</pre>

<p><!------Word Wrapping Off-------><a NAME="wrap"></a></p>

<h3>对于很长的行是否进行换行的设置(Word Wrapping) <img SRC="netscape.gif" tppabs="http://www.yessir.net/html/netscape.gif" HEIGHT="14" WIDTH="80"></h3>

<h3>&lt;textarea wrap=off&gt; ... &lt;/textarea&gt;</h3>

<dl>
<dd>不换行,是缺省设置。</dd>
</dl>

<p><!------Word Wrapping Soft-------></p>

<h3>&lt;textarea wrap=soft&gt; ... &lt;/textarea&gt;</h3>
“软换行”,好象 MS-WORD 里的“软回车”。

<dl>
<dd><tt>&lt;form action=/cgi-bin/post-query method=POST&gt;<br>
&lt;textarea wrap=soft name=comment rows=5 cols=25&gt; &lt;/textarea&gt;&lt;P&gt;<br>
&lt;input type=submit&gt;&lt;input type=reset&gt;<br>
&lt;/form&gt;</tt><br>
</dd>
</dl>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/cgi-bin/post-query" method="POST"><textarea wrap="soft" name="comment" rows="5" cols="25"></textarea></p>

<p><input type="submit"><input type="reset"></form></p>

<p><!------Word Wrapping Hard-------></p>

<h3>&lt;textarea wrap=hard&gt; ... &lt;/textarea&gt;</h3>
“硬换行”,好象 MS-WORD 里的“硬回车”。

<dl>
<dd><tt>&lt;form action=/cgi-bin/post-query method=POST&gt;<br>
&lt;textarea wrap=hard name=comment rows=5 cols=25&gt; &lt;/textarea&gt;&lt;P&gt;<br>
&lt;input type=submit&gt;&lt;input type=reset&gt;<br>
&lt;/form&gt;</tt><br>
</dd>
</dl>

<p><form action="http://www.yessir.net/cgi-bin/post-query" tppabs="http://www.yessir.net/cgi-bin/post-query" method="POST"><textarea wrap="hard" name="comment" rows="5" cols="25"></textarea></p>

<p><input type="submit"><input type="reset"></form></p>

<pre>
</pre>

<p><!--################## (^^) Jump & Add (^^) ########################-->
<hr><a HREF="../../tppmsgs/msgs0.htm#1" tppabs="http://ncdesign.kyushu-id.ac.jp/"><img SRC="angel-homeg.gif" tppabs="http://www.yessir.net/html/angel-homeg.gif" ALT="NCD HOME" HSPACE="3" VSPACE="10" BORDER="0" HEIGHT="46" WIDTH="55" ALIGN="LEFT"></a>
<b><a HREF="../../tppmsgs/msgs0.htm#2" tppabs="http://www.yessir.net/html_design.html">HTML
Design Guide Main Page<br>
<nobr></a></b><font FACE="'Times New Roman', Arial"><font SIZE="-1"><a HREF="../../tppmsgs/msgs0.htm#8" tppabs="http://www.yessir.net/html/html_design.html#content">Contents</a>
|| <a HREF="page.html" tppabs="http://www.yessir.net/html/page.html">Page</a>
|| <a HREF="font.html" tppabs="http://www.yessir.net/html/font.html">Font</a>
|| <a HREF="text_style.html" tppabs="http://www.yessir.net/html/text_style.html">Text
Style</a> || <a HREF="image.html" tppabs="http://www.yessir.net/html/image.html">Image</a>
|| <a HREF="form.html" tppabs="http://www.yessir.net/html/form.html">Form</a>
|| <a HREF="table.html" tppabs="http://www.yessir.net/html/table.html">Table</a>
|| <a HREF="table02.html" tppabs="http://www.yessir.net/html/table02.html">Table
Advanced</a> <br>
|| <a HREF="frame.html" tppabs="http://www.yessir.net/html/frame.html">Frames</a>
|| <a HREF="marquee.html" tppabs="http://www.yessir.net/html/marquee.html">Marquee</a>
|| <a HREF="inline.html" tppabs="http://www.yessir.net/html/inline.html">Alternative
Inline Elements</a> <br>
</font><font SIZE="-2"><a HREF="tag-index.html" tppabs="http://www.yessir.net/html/tag-index.html">Tag
Index</a> || <a HREF="new.html" tppabs="http://www.yessir.net/html/new.html">What's
New</a></font><font SIZE="-1"> </font></font><br clear="all">
</p>

<p>Network Communication Design<br>
<a HREF="../../tppmsgs/msgs0.htm#1" tppabs="http://ncdesign.kyushu-id.ac.jp/">http://ncdesign.kyushu-id.ac.jp/<br>
</a>C&amp;P 1994-1996 Yuriko Ienaga <font SIZE="-1"><a HREF="mailto:v91102@vgenda.kyushu-id.ac.jp">v91102@vgenda.kyushu-id.ac.jp</a></font>
<!--################## (^^) END (^^) ########################--></p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -