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

HTML框架

2019-02-27 21:54 92 查看

一、表单:用来收集用户的信息
1.type设置表单类型
2.placeholder设置文本框的占位符
3.action表单数据提交路径地址(get、post)

<body>
<form>
<label>
用户名:<input type="text" maxlength="8" placeholder="请输入用户名" />
</label>

<br/>
<label>
密 码:<input type="password" placeholder="请输入密码" maxlength="8" />
</label>

<br />
性别:<label><input type="radio" name="rad1" />男</label>
<label><input type="radio" name="rad1"/>女</label>
<br />
<input type="submit" value="提交" />
<br />
<select>
<option>中国+86</option>
<option>阿根廷+54</option>
<option>阿鲁巴+297</option>
</select>
<br />
兴趣爱好:
<input type="checkbox" />篮球
<input type="checkbox" />足球
<input type="checkbox" />游泳
<input type="checkbox" />阅读
</form>

</body>

二、框架
1.用frameset代替了body
2.rows设置行的占页面的百分比;
cols设置列的所占百分比;
*表示剩余的百分比;
frameborder设置框架的边框(0–不显示边框、1–在每个页面之间都显示边框);
bordercolor设置边框颜色;
framespacing表示框架与框架间保留的空白距离。
3.noresize设置禁止用户拖拉框架大小;

<frameset rows="30%,*,10%" frameborder="1"  bordercolor="blue" framespacing="10">
<frame src="02.html" noresize="noresize" scrolling="no" />
<frameset cols="20%,70%,*">
<frame src="03.html" />
<frame src="01.html" noresize="noresize" scrolling="no"/>
<frame src="index.html" noresize="noresize" scrolling="no"/>
</frameset>
<frame src="03.html" noresize="noresize" scrolling="no"/>
</frameset>

表单提交的方式post和get他们的区别?

1.get是从服务器上获取数据,post是向服务器传送数据。
2.get是把参数数据队列加到提交表单的ACTION属性所指的URL中,值和表单内各个字段一一对应,在URL中可以看到。post是通过HTTPpost机制,将表单内各个字段与其内容放置在HTML HEADER内一起传送到ACTION属性所指的URL地址。用户看不到这个过程。
3.对于get方式,服务器端用Request.QueryString获取变量的值,对于post方式,服务器端用Request.Form获取提交的数据。
4.get传送的数据量较小,不能大于2KB。post传送的数据量较大,一般被默认为不受限制。但理论上,IIS4中最大量为80KB,IIS5中为100KB。
5.get安全性非常低,post安全性较高。

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