4221学习网
首页 | 网址大全 | 脑力倍增 | 电脑学院 | 学习方法 | 英语学习 | 口才交际 | 工作职场 | 成功励志 | 文学小说 | 视频教程 | 视频短片 | 下载中心 | NBA | 奥运 | 图片专区 | QQ·技巧 | 游戏技巧 | 恋爱技巧 | 谈天说地 | 专题教程 | 4221论坛
热门关键字: 视频教程  百家讲坛  美女  记忆力  疯狂英语
 → 当前位置:4221学习网>电脑学院>网页制作>Html教程>正文

表单(FORM)标记(TAGS)

4221学习网 2007-09-28 来源:互联网 收藏本文

训练30小时,让阅读提速5-10倍!---速读记忆训练软件免费下载!(点击下载)

+ 基本语法

表单的基本语法

<form action="url" method=*>
...
...
<input type=submit> <input type=reset>
</form>

*=GET, POST

表单中提供给用户的输入形式

<input type=* name=**>

*=text, password, checkbox, radio, image, hidden, submit, reset

**=Symbolic Name for CGI script

+ 文字输入和密码输入

*=text, password

<input type=*>
<input type=* value=**>

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

您的姓名:
您的主页的网址:
密码:

 

<input type=* size=**>
<input type=* maxlength=**>

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



 

+ 复选框(Checkbox) 和 单选框(RadioButton)

<input type=checkbox>
<input type=checkbox checked>
<input type=checkbox value=**>

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

Banana

Apple

Orange

 

<input type=radio value=**>
<input type=radio value=** checked>

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

Banana

Apple

Orange

 

+ 图象坐标

在下面选则一个系数后,在图象上点一下,就知道什么是图象坐标了!

<input type=image src=url>

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

x2 x4 x6

 

+ 隐藏表单的元素

<input type=hidden value=*>

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

Here is a hidden element.

 

+ 列表框(Selectable Menu)

基本语法

<select name=*>
<option> ...
</select>

<option selected>
<option value=**>

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

 

<select size=**>

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

 

<select size=** multiple>

注意,是用 Ctrl 键配合鼠标实现多选。
(和 MS-WINDOWS 的 File Manager 一样)

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

 

+ 文本区域

<textarea name=* rows=** cols=**> ... <textarea>

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

 

对于很长的行是否进行换行的设置(Word Wrapping)

<textarea wrap=off> ... </textarea>

不换行,是缺省设置。

<textarea wrap=soft> ... </textarea>

“软换行”,好象 MS-WORD 里的“软回车”。

<form action=/cgi-bin/post-query method=POST>
<textarea wrap=soft name=comment rows=5 cols=25> </textarea><P>
<input type=submit><input type=reset>
</form>

<textarea wrap=hard> ... </textarea>

“硬换行”,好象 MS-WORD 里的“硬回车”。

<form action=/cgi-bin/post-query method=POST>
<textarea wrap=hard name=comment rows=5 cols=25> </textarea><P>
<input type=submit><input type=reset>
</form>

上一篇:表格(TABLE)标记(TAGS)   下一篇:文字布局(TEXT STYLE)标记(TAGS
添加到google书签 digg this! 添加到bolaa 添加到yahoo+ 添加到新浪vivi 添加到365key  
收藏】 【评论】 【推荐】 【投稿】 【打印】 【关闭

相关文章
·表格(TABLE)标记(TAGS)
·文字布局(TEXT STYLE)标记(TAGS
·表格进阶(TABLE ADVANCED)
·字体(FONT)标记(TAGS)
·会移动的文字
·页面(PAGE)标记(TAGS)
·多媒体页面
·正则表达式过滤HTML危险脚本
·HTML语言剖析(一)Html简介
·HTML语言剖析(二)HTML标记一览
发表评论
要记得去论坛讨论,点击注册新会员) 密码: 匿名评论
评论内容:(请自觉遵守互联网相关政策法规。)
最新文章
·页面(PAGE)标记(TAGS)
·字体(FONT)标记(TAGS)
·文字布局(TEXT STYLE)标记(TAGS
·表格(TABLE)标记(TAGS)
·表格进阶(TABLE ADVANCED)
·会移动的文字
·多媒体页面
·正则表达式过滤HTML危险脚本
·HTML语言剖析(一)Html简介
·HTML语言剖析(二)HTML标记一览
本类阅读排行榜
·HTML语言剖析(四)排版标记
·正则表达式过滤HTML危险脚本
·HTML语言剖析(二)HTML标记一览
·页面(PAGE)标记(TAGS)
·HTML语言剖析(一)Html简介
·表格(TABLE)标记(TAGS)
·HTML语言剖析(三)文件标记
·多媒体页面
·字体(FONT)标记(TAGS)
·表格进阶(TABLE ADVANCED)
热点视频教程
视频街舞 舞步 教学
视频windowsxp重装系统视频教程
视频李孝利十分钟详细舞蹈教程
视频美女教你跳舞
视频街舞 舞步 教学2
视频双截棍视频教程-定式
视频如何安装双操作系统
视频韩国的太空步教程,后滑、侧滑、旋转太空
视频【WindowsXP入门教程】 - 硬盘分区
视频台球教程-基本杆法
视频[百家讲坛]三十六计01_借刀杀人
视频24式太极拳教学---基本动作
视频 斯诺克台球竿法-后退球
视频动物世界之决战生死线2
视频超级全脑速读训练教程

设为首页 - 加入收藏 - 关于我们 - 联系我们 - 友情连接

4221学习网版权所有-鄂ICP备07006816号
已浏览: