ifram标签 用于一个页面嵌套另一个页面,
属性:framborder="0" 用于展示边框为0,如果不写iframe默认会有个border 会不好看
name属性要和a标签结合使用
src="#"代表当前页面
也可写src="http:// www.baidu.com" 例如:<ifram src="http:// www.baidu.com" name=xxx framborder="0"></ifram>
<ifram src="./index2" name=xxx framborder="0"></ifram> src相对路径,会渲染当前目录下index2
点击baidu 会在嵌套页面打开baidu.com 点击qq会在嵌套页面打开baidu
<ifram src="#" name=xxx framborder="0"></ifram>
<a target=xxx href="http://www.baidu.com">baidu</a> 在name为xxx的窗口打开
<a target=xxx href="http://www.qq.com">qq</a>
a标签 用于跳转网页链接
1. target属性
target=_blank 空白页面打开 target=_self 当前页面打开 target=_parent 父页面打开 target=_top 顶级页面打开
2. download属性用来下载
<a href="http://qq.com" download>download</a>
3. href属性
href=qq.com相当于打开一个qq.com文件,
a 要想跳转必须写http协议
b <a href="//qq.com" download>download</a> 当前协议是什么协议就是什么协议
注:(npm -i -g http-server 小工具)http-server -c -1无缓存
c href ="index2.html"
d href =“#” 锚点 不发送请求但是会刷新页面, 其余都发送GET请求
e href ="?name=哈哈哈"
f 伪协议 JavaScript:;不 跳转,点击后什么都不做
g href=" " 跳转自己 发送GET请求
h 不写href 相当于个span
form标签也是跳转页面,发起post请求,和a标签相反成对的 也有target标签与a标签的target一样
<form action=“index2.html?chaxuncanshu” methd="post">
<input type="text" name="usersname" > name的值username是请求参数http 请求中的第四部分
<input type="password" name="password" >
<input type="submit" value="提交" >
</form> //form表单如果没有submity提交按钮 就无法提交form表单 如果不写method默认get
input标签<input></input>
<input type="submit" value="提交" >
<input type="button" value="button" >
<input type="checkbox" id="xxx" ><label for="xxx">单选框右侧文字,不写label,点击文字不会选中checbox,结合for id </label>
============================checkbox=================================
<label><input type="checkbox" name="sport" value ="basketball>篮球</label> //label将input包起来就不用写id
<label><input type="checkbox" name="sport" value="football">足球</label>
==============================radio=======================
<label><input type="radio" name="sport" value="football">足球</label> //radio 如果有同一个name 就会单选
<label><input type="radio" name="sport" value="basketball">篮球</label>
===============================select========================
<select name="group" multiple> 多选
<option value =" ">-</option> //写空 或者不写 代表空值
<option value ="1">first</option>
<option value ="2">sec</option>
<option value ="3" disabled>third/option> //不可选择
<option value ="4" selected>four</option> // 默认选中
</select>
============================button==================
<input type="button" value="button" >
<button>button</button>如果button按钮没有写type类型 自动升级为submit 按钮 form表单可以提交,如果button 写type不能提交
table 标签
<table border="1"> 宽度为1边框
<colgroup ><col bgcolor=red width=100> <col width=100> <col width=100> </colgroup> //列宽度
==============================thead=====================
<thead> / /表头
<tr> //table row
<th>姓名</th> <th>年龄</th> <th>电话</th>
</tr>
</thead>
=============================tbody==================================
<tbody> //身体
< tr> //table row
<td>张三</td><td>18</td> <td>18888888888</td> //table dat
</tr>
<tr> //table row
<td>李四</td><td>18</td> <td>16688888888</td> //table dat
</tr>
</tbody> //身体
<tfoot><</tfoot> //尾部
<table>
备注:如果不写tbody thead tfoot 浏览器会默认放在tbody中,将按顺序展示