您的位置:首页 > Web前端 > HTML

HTML框架与表单

2015-06-16 16:02 543 查看
1.框架处理结构

  <html>

    <head>

      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

      <title>test</title>

    </head>

    <frameset rows="90,*">

      <frame src="",name="" />

      <frame src="",name="" />

    </frameset>

  </html>

2.常用属性:

  1)rows:用像素或者百分比分割上下窗口,*表示剩余部分

  2)cols:用像素或者百分比分割左右窗口,*表示剩余部分

  3)frameborder:指定是否显示边框,0表示不显示,1表示显示

  4)border:指定框架的粗细

  5)noresize:表示<frame>指定框架不能够调节

3.<noframes></noframes>:在浏览器不支持框架时使用

  <noframes>

    <body>

    </body>

  </noframes>

4.表单<form></form>

  <form action="" method="get/post" enctype=""></form>

  1)action:URL,表示表单提交时,向何处发送表单数据

  2)method:get/post,规定如何发送表单数据

  3)name:规定表单名称

  4)enctype:MIME_type,规定表单数据在发送到服务器之前应该如何编码,默认:application/x-www-form-urlencoded,在上传文件时:multipart/form-data

5.常用表单属性:

  1)<input />

  <input type="text" name="user" <!--value="默认值" maxlength="10"--这部分可有可无> /> text框

  <input type="password" name="password"> 密码框

  其他type属性:

  checkbox:复选框

  radio:单选框

  submit:提交按钮

  reset:重置按钮

  file:上传框

  hidden:隐藏域,用来存储固定值,不让用户看到

  button:普通按钮

  2)<textarea name="name"></textarea> :多行文本域

  3)<select>候选内容</select>:下拉框

  <select name="name">

    <option value="1">内容</option>

    <option value="2" selected="selected">内容</option>

    <option value="3">内容</option>

  </select>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: