M1017556 HTML 5CSS 3 HTML M1029266 HTML form
- Slides: 29
二维码 M!1017556 HTML 5与CSS 3开发 HTML表单 二�� M!1029266 HTML表单
表单事例 表单提交地址和方 法的设置 …… <form action="login. jsp" method="post"> <p>用户名:<input name="username" type="text" size="20" maxlength="10" /></p> 表单输入元 <p>密 码: 素:input <input name="pwd" type="password" size="20" /></p> <p><input type="submit" name="btn" value="提交" /> <input name="reset" type="reset" value="重填" /></p> </form> ……
表单元素—密码框 <input name= "名称" type="password" value="初值" size="数字"> <form method="post" action=""> <p>密 码: <input name="pass" type="password" size="22" /> </p> …… </form> 隐藏输入的信息 操作演示:密码框
表单元素—按钮 <input name= "名称" type= "按钮类型" value="按钮文字" src="图片按钮的图片 url"> 普通按钮:button 提交按钮:submit 重置(清空)按钮:reset 图片按钮:image . . . <input type="reset" name="reset" value=" 重填" /> <input type="submit" name="button" value="同意……" /> <input type="button" name="confirm" value="点播音乐" /> <input type="button" name="cancel" value="取消" /> <input type="image" src="images/login. gif" /> …… 操作演示:命名按钮应用
表单元素-单选按钮 <input name= “组名" type= "radio" value= "… " checked= " … " > 名字name相同表明 属于同一组 . . . <br />性别: <input name="gen" type="radio" value="男" checked="checked"> <input name="gen" type="radio" value="女" > …… 特点:单选 操作演示:单选按钮应用
表单元素-复选框 <input type="checkbox" name= " … " value= " … " checked= " … " > …… 爱好: <input type="checkbox" name="hobby 1" value="sports" /> 运动 <input type="checkbox" name="hobby 2" value="talk" checked="checked" />聊天 <input type="checkbox" name="hobby 3" value="play" /> 玩游戏 …… 特点:多选 操作演示:复选框应用
表单元素-文件域 <input type="file" name= " … " >. . . <p><input type="file" name="files" /><br /> <input type="submit" name="upload" value="上传" /></p> …… 显示上传文件的地址 操作演示:文件域应用
Input标签总结 前面所学的各类表单元素,语法分别是什么? type 功能 例子 text 单行文本输入 <input type="text" name="username" /> password 密码 <input type="password" name="password" /> radio 单选 <input type="radio" name="sex" value="男" />男 <input type="radio" name="sex" value="女" />女 checkbox 多选 <input type="checkbox" name="hobby" value="书" />书 <input type="checkbox" name="hobby" value="画" />画 reset 重置表单数据 <input type="reset" value="重置" /> file 文件上传 <input type="file" name="files" /> submit 提交表单数据 <input type="submit" value="提交" /> image 图形提交按钮 <input type="image" src="images/button. gif" /> button 普通按钮 <input type="button" value="播放音乐" />
表单元素-下拉列表 <select name="指定列表名称" size="行数"> <option value="选项值" selected="selected">…</option> … … </select>. . . <select name="bmon"> <option value="" selected="selected">[选择月份]</option> <option value="0">一月</option> <option value="1">二月</option> <option value="2">三月</option> <option value="3">四月</option> </select> …… 操作演示:列表框应用 提供固定选项,避免 用户输入错误
THANK YOU
- Affirmative form present continuous
- Canvas доска
- Slidetodoc.com
- Doctype html html head
- Doctype html html head
- Doctype html html head
- Html5 form attributes
- Html form assignment
- Guestbook.html degree
- Html form object
- Create html form
- Pengertian dari form
- Html form outline
- Html body form
- Standard form to vertex form
- How to convert polar to rectangular
- Log and exponential form
- Trigonometric to rectangular form
- How to write a standard equation of a circle
- How to put the equation of a circle in standard form
- Rectangular form complex numbers
- How to find the vertex of a function
- In vertex form
- Standard form transformations
- Factored form formula
- Unnormalized
- Shall not contracted form
- Log to exponential form
- Flux density formula
- Standard form parabola