HTML3

xiaoxiao2021-02-28  105

下拉列表的好处

1.     节约页面空间

2.     方便输入

3.     规范输入

<select>定义一个下拉列表

<option>下拉列表的选项

你来自哪里:     <select name="province" id="">         <option value="33">浙江</option>         <option value="41">河南</option>         <option value="32">江苏</option>         <option value="36">江西</option>     </select> </form>  

多选下拉列表

<multiple>用于多选

<ctri>单机选择多个

<select name="color" multiple select=3>     <option value="red">红色</option>     <option value="green">绿色</option>     <option value="yellow">黄色</option>     <option value="black">黑色</option> </select>

 

下拉列表分组

<Optgroup>定义分组显示文字

<Disabled>添加这个属性该组不能用

<optgroup label="日系车" disabled>         <option value="丰田">丰田</option>         <option value="本田">本田</option>         <option value="三菱">三菱</option>     </optgroup>

 

设置表单

<fieldset>     <legend>名单表</legend>     姓名:<inputtype="text"/><br/>     电话:<inputtype="text"/><br/>     父母电话:<inputtype="text"/>

</fieldset>

     <fieldset>用于分组,达到表达清晰的目的

<legend>外边框内容

 

表格的使用:

<table>定义一个表格

<thead>定义表头部分

<tr>定义一行

<th><td>定义一个数据项(单元格),

<th>一般用于表头,有加粗样式,

<td>一般用于表格主体部分,没有加粗样式。

<td>的rowspan和colspan分别定义单元格跨行的行数,跨列的列数

<table border="1" cellspacing="0" cellpadding="15%"> <thead> <tr>     <th>序号</th>     <th>姓名</th>     <th>性别</th>     <th>血型</th>     <th>单位</th>     <th>工资</th> </tr> <tr>     <td>01</td>     <td>张文雅</td>     <td></td>     <td>o</td>     <td rowspan="2">中国电网</td>     <td>5000元</td> </tr>

 

转载请注明原文地址: https://www.6miu.com/read-41596.html

最新回复(0)