<form> 标签
<form method="传送方式" action="服务器文件">
action :浏览者输入的数据被传送到的地方,比如一个PHP页面(save.php)。
method : 数据传送的方式(get/post)。 get用于信息获取,是从那个网页获得,post是向那个网页提交数据,其详细区别见此网址: http://www.cnblogs.com/hyddd/archive/2009/03/31/1426026.html
示例1:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>表单标签</title>
</head>
<body>
<form method="post" action="save.php">
<label for="username">用户名:</label>
<input type="text" name="username" id="username" value="" />
<label for="pass">密码:</label>
<input type="password" name="pass" id="pass" value="" />
<input type="submit" value="确定" name="submit" />
<input type="reset" value="重置" name="reset" />
</form>
</body>
</html>
结果图,其都在同一行显示。

·label标签不会向用户呈现任何特殊效果,它的作用是为鼠标用户改进了可用性。如果你在 label 标签内点击文本,就会触发此控件。就是说,当用户单击选中该label标签时,浏览器就会自动将焦点转到和标签相关的表单控件上(就自动选中和该label标签相关连的表单控件上)。
·
<label for="username">用户名:</label>
<input type="text" name="username" id="username" value="" />
"for" 属性可把 label 绑定到另外一个元素。请把 "for" 属性的值设置为相关元素的 id 属性的值。
label标签for里面的值就是其后input标签id的值。
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>fieldset示例</title>
</head> <body>
<form method="post" action="submit.html"> <p>
<label for="name">Name:</label>
<input type="text" id="name" name="name" placeholder="Your name" required="required" />
</p>
<p>
<label for="email">Email:</label>
<input type="email" id="email" name="email" placeholder="Your email address" required="required" />
</p>
<p>
<label for="message">Message:</label>
<textarea cols="45" rows="7" id="message" name="message" required placeholder="Write your message here."></textarea>
</p>
<input type="submit" value="Send" />
</form>
</body>
</html>
结果图如下, <!--加p标签是为了让各个表单单独成block,不至于显示在同一行-->

<form> 标签的更多相关文章
- embed标签loop=true背景音乐无法循环
在html网页中加入背景音乐并设置为循环播放.一开始用<embed>标签,设置loop="true", 但是结果发现在IE浏览器可以,但是在chrome浏览器却无法实现 ...
- 【转】object标签和embed标签
我们现在大部分人做网页,都是直接用DW插入flash,而且DW也是所见即所得,直接生成了相应的flash显示代码.可是我们又有多少人了解这些直接由DW生成的代码呢?其实我接触flash player标 ...
- embed标签的使用(在网页中播放各种音频视频的插件的使用)
播放器插件使用说明: 代码:< EMBED src=“music.mid”autostart=“true”loop=“2”width=“80”height=“30”> src:音乐文件的路 ...
- as3.0 [Embed]标签嵌入外部资源
1.[Embed]嵌入资源 ActionScript代码的顺序非常重要.你必须在声明变量前添加[Embed]元数据标签,而且这个变量的类型会是Class; package { import flash ...
- 解决embed标签显示在div上层【转藏】
解决embed标签显示在div上层,非设置z-index 今天给屌炸了爆笑网增加了视频栏目,但是发现在IE8中,顶部浮动导航的div在移动到embed视频上时,总是被embed的flash文件盖住.分 ...
- OBJECT和EMBED标签(转载)
一.介绍: 我们要在网页中正常显示flash内容,那么页面中必须要有指定flash路径的标 签.也就是OBJECT和EMBED标签.OBJECT标签是用于windows平台的IE浏览器的,而EMBED ...
- 转: object 和embed 标签播放flash
一.介绍: 我们要在网页中正常显示flash内容,那么页面中必须要有指定flash路径的标 签.也就是OBJECT和 EMBED标签.OBJECT标签是用于windows平台的IE浏览器的,而EMBE ...
- OBJECT和EMBED标签
一.介绍: 我们要在网页中正常显示flash内容,那么页面中必须要有指定flash路径的标 签.也就是OBJECT和EMBED标签.OBJECT标签是用于windows平台的IE浏览器的,而EMBED ...
- HTML 5 <embed> 标签
定义和用法 <embed> 标签定义嵌入的内容,比如插件. 实例 <embed src="helloworld.swf" />
- chrome不支持embed标签解决方案
<!DOCTYPE html> <html> <head> <title></title> <meta http-equiv=&quo ...
随机推荐
- IDEA建立一个可运行的struts2项目
参考博客:https://blog.csdn.net/shuai_wy/article/details/79027573 直接使用IDEA创建struts2项目,配置好tomcat后是跑不起来的 需要 ...
- Tensorflow Eager execution and interface
Lecture note 4: Eager execution and interface Eager execution Eager execution is (1) a NumPy-like li ...
- 1. CountDiv 数数有几个 Compute number of integers divisible by k in range [a..b].
package com.code; public class Test05_1 { public static int solution(int A, int B, int K) { // handl ...
- V Server Ubuntu
Ubuntu下代理伺服器通常使用squid 安裝 sudo apt-get install squid 修改squid.conf配置 sudo vim /etc/squid/squid.conf 公司 ...
- HTML5权威指南之—第三章
HTML页面上元素的焦点能够通过"tab"键在各个元素之间切换,使用"tabindex"属性能够改变默认的转移顺序 Tabindex为1的元素会首先被选中.然后 ...
- 自由宣言--《I Have a Dream》(马丁.路德.金)
I Have a Dream by Martin Luther King, Jr. I am happy to join with you today in what will go down in ...
- CloudEngine 6800基础配置-02_常用命令操作
查看未提交配置 system-view ftp server enable display configuration candidate 删除未提交的配置 clear configurati ...
- Unity编程笔录--ulua+PureMVC框架简单热更新使用
ulua+PureMVC框架简单热更新使用 前言: 1:作者官网论坛 首先介绍的是这个框架是一位大牛 骏擎[CP] jarjin 写的,据说原本是"非常多人不知道怎么使用Ulua,所 ...
- LeetCode 500. Keyboard Row (键盘行)
Given a List of words, return the words that can be typed using letters of alphabet on only one row' ...
- SpringBoot在Impl类中调用其它service层失败解决办法
在AImpl.java文件中引用BImpl.java的方法,编译正常,运行到调用的地方,报空指针异常,跟踪到异常位置,发现service为空,也就是按照之前controller层通过@Autowire ...