码迷,mamicode.com
首页 > Web开发 > 详细

Day1_HTML_表单标记

时间:2015-08-10 02:09:26      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:修改密码   服务器   安全性   标签   中国   


8.表单标记及语义化

表单用来搜集数据,并且提交信息

只有在表单标签内的信息才能提交成功给服务器

普通按钮作用在于调用JAVAscript代码执行动态的效果

两种提交方式get和post,第一区别:附加数据大小,安全性


2、需求分析

一共两个表框

表框一:必填信息

姓名:name,只读,不能修改

密码:输入符号显示,显示50个字符

性别:默认男,单选


表框二:

国籍:默认中国,单选

爱好:多选

学历:下拉框单选

备注

技术分享

普通按钮:显示提示框

提交按钮:提交表单在新页面显示submit

重置按钮:reset


 <body>

<form action = "02-字体标签.html" method = "post">

   <fieldset>

<legend>必填信息</legend>

姓名:<input type = "text" value = "请输入姓名" size = "50" readonly disabled><br>

密码:<input type = "password" value = "请输入姓名" size = "50" ><br>

隐藏框:<input type = "hidden" value = "请输入姓名" size = "50"><br>

性别:<input type = "radio" name = "gender" value = "male" checked>男<input type = "radio" name = "gender" value = "female">女<br>

</fieldset>

<br>

<fieldset>

<legend>选填信息</legend>

国籍:<input type = "radio" name = "country" value = "china" checked>中国<input type = "radio" name ="country" value = "america">美国<br>

爱好:<input type = "checkbox" name = "love" value = "eat" checked>吃饭

<input type = "checkbox" name = "love" value = "sleep" checked>睡觉

<input type = "checkbox" name = "love" value = "study" checked>学java<br>

   学历:<select name = "xueli"  >

  <option value = "大学">大学</option>

  <option value = "高中">高中</option>

  <option value = "小学">小学</option>

</select>

备注:<textarea rows = "5" cols = "20" >大神留点话吧</textarea><br>

</fieldset>

<input type = "button" value = "普通按钮" onclick = "alert(this.type)">

<input type = "submit" value = "提交按钮">

<input type = "reset" value = "重置按钮">

<input type = "image" src = "images/1.jpg" width = "80" height = "30">


</form>

<button onclick = "alert(‘大家好‘)">普通按钮</button>

 </body>


本文出自 “与君共勉” 博客,请务必保留此出处http://rickyigoogle.blog.51cto.com/8747999/1683158

Day1_HTML_表单标记

标签:修改密码   服务器   安全性   标签   中国   

原文地址:http://rickyigoogle.blog.51cto.com/8747999/1683158

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!