body分为块级和行内
<div>qwer<br/>zxcv</div>
<div style="background-color: green;">qwer</div>
span style="background-color: green;">zxcv</span>
<p>hahahahah</p>
<p>hahahahahaaa</p>
h1~h6y依次变小
<div>默认文字字体</div>
<h1>再再再再再粗一点</h1>
<h2>再再再再粗一点</h2>
<h3>再再再粗一点</h3>
<h4>再再粗一点</h4>
<h5>再粗一点</h5>
<h6>粗一点</h6>
<a href="http://www.baidu.com" title="baidu">百度</a>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>野鸡平台</title>
</head>
<body>
<h1>章节</h1>
<a href="#i1" title="第一章">第一章 寂寞的春天</a>
<a href="#i2" title="第二章">第二章 寂寞的夏天</a>
<a href="#i3" title="第三章">第三章 寂寞的秋天</a>
<a href="#i4" title="第四章">第四章 寂寞的冬天</a>
<h1>内容</h1>
<div style="height: 1000px;" id="i1">
<h3>第一章 寂寞的春天</h3>
<p>春暖花开,万物复苏,又到了交配的季节。</p>
</div>
<div style="height: 1000px;" id="i2">
<h3>第二章 寂寞的夏天</h3>
<p>夏天夏天悄悄过去留下小咪咪</p>
</div>
<div style="height: 1000px;" id="i3">
<h3>第三章 寂寞的秋天</h3>
<p>今年的秋天真是寂寞呀!!!</p>
</div>
<div style="height: 1000px;" id="i4">
<h3>第四章 寂寞的冬天</h3>
<p>下雪</p>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>野鸡平台</title>
</head>
<body>
<ul>
<li>周杰伦</li>
<li>林俊杰</li>
<li>王力宏</li>
</ul>
<ol>
<li>铁锤</li>
<li>钢弹</li>
<li>狗蛋</li>
</ol>
<dl>
<dt>河北省</dt>
<dd>邯郸</dd>
<dd>石家庄</dd>
<dt>山西省</dt>
<dd>太原</dd>
<dd>平遥</dd>
</dl>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>6666</title>
</head>
<body>
<table border="3"> <!--border 选择表格样式-->>
<thead>
<tr>
<th>姓名</th>
<th>年龄</th>
<th>爱好</th>
</tr>
</thead>
<tbody>
<tr>
<td>xxxx</td>
<td>18</td>
<td>看书</td>
</tr>
<tr>
<td rowspan="3">aaaa</td> <!--rowspan 合并单元格-->>
<td>18</td>
<td>吃饭</td>
</tr>
<tr>
<td>33</td>>
<td>heiheihei</td>>
</tr>>
</tbody>
</table>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>6666</title>
</head>
<body>
<!--显示本地图片,找不到图片则显示alt中的文字-->
<img src="img/lover.png" alt="美女">
<!--显示网络图片-->
<img src="https://images.cnblogs.com/cnblogs_com/wupeiqi/662608/t_212313579359018.png" alt="妹子">
</body>
</html>
type
<button type="button"> 按钮 </button>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>666666</title>
</head>
<body>
<h3>文本框</h3>
<input type="text">
<h3>密码框</h3>
<input type="password">
<h3>单选框</h3>
<input type="radio" name="gender">男
<input type="radio" name="gender">女
<h3>复选框</h3>
<input type="checkbox">篮球
<input type="checkbox">足球
<input type="checkbox">橄榄球
<h3>上传文件</h3>
<input type="file">
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML学习</title>
</head>
<body>
<h3>单选</h3>
<select>
<option>上海</option>
<option>北京</option>
<option>深圳</option>
</select>
<h3>多选</h3>
<select multiple>
<option>上海</option>
<option>北京</option>
<option>深圳</option>
</select>
</body>
</html>
<!DOCTYPE html>
卧槽,无情呀
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>HTML学习</title>
</head>
<body>
<textarea>文本内容写在这里...</textarea>
</body>
</body>
</html>
用于提交数据到后台
// 提交表单之后,实际上会将表单中的数据构造成一种特殊的结构,发送给后台,类似于:
{
user:用户输入的姓名,
pwd:用户输入的密码,
...
}
elect是HTML中的下拉列表标签,支持单选和多选,但是不支持手动输入,以下是一些解决方案。
Datalist是HTML5的原生标签,用于向input提供下拉和自动提示选项,支持输入和下拉选择两种方式。但是目前IE10及其以下浏览器并不支持, 并且IE11无法触发input和change事件,相当于IE系列均无法很好地实现。如果仅支持Chrome或Eletron桌面的应用则可以放心使用。
好处不需要引用额外的JS/CSS文件支持,示例:
<input list="cookies" placeholder="Type of Cookie"/> <datalist id="cookies"> <option value="Chocolate Chip"/> <option value="Peanut Butter"/> <option value="Raisin Oatmeal"/> </datalist>
在线示例 http://jsfiddle.net/joshpauljohnson/Uv5Wk/
有时侯,我们是必须要兼容旧版IE的。而且很多时侯,我们并不需要datalist的自动补全功能,我们可能更希望即使下拉选择中没有匹配用户输入的内容,所有选项也能够弹出来。这样通过纯HTML+CSS即可实现,基本原理是使用 input/select 两个元素,然后 input 覆盖在 select 上层 ,宽度并比select窄一点,这样用户就能点到select的箭头弹出下拉框。参考: Stackoverflow
<div class="select-editable"> <select onchange="this.nextElementSibling.value=this.value"> <option value=""></option> <option value="115x175 mm">115x175 mm</option> <option value="120x160 mm">120x160 mm</option> <option value="120x287 mm">120x287 mm</option> </select> <input type="text" name="format" value="" /> </div>
.select-editable { position:relative; background-color:white; border:solid grey 1px; width:120px; height:18px; } .select-editable select { position:absolute; top:0px; left:0px; font-size:14px; border:none; width:120px; margin:0; } .select-editable input { position:absolute; top:0px; left:0px; width:100px; padding:1px; font-size:12px; border:none; } .select-editable select:focus, .select-editable input:focus { outline:none; }
在线示例: http://jsfiddle.net/nwH8A/
这是一个由JavaScript编写的自动补全插件,不依赖jQuery且仅有5.4kB
项目地址:https://github.com/Pixabay/JavaScript-autoComplete
Magicsuggest是一个非常流行的自动补全插件,复用了Bootstrap的CSS样式,基于Bootstrap框架的可以考虑
https://github.com/nicolasbize/magicsuggest
要:禁止input缓存,禁止select缓存
有时候,我们页面的输入框,我们再页面里输入内容后,并不保存,但是刷新页面会发现值为输入的页面,完全没有从新去从后台取值,这是怎么回事呢?如下:
雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆雷姆雷姆拉姆拉姆
<input type="text" value="">
<select>
<option value="1">1</option>
<option value="2">1</option>
</select>
其实多数浏览器默认会缓存input的值,只有使用ctl+F5强制刷新的才可以清除缓存记录。如果不想让浏览器缓存input的值,很简单,只需要价格属性即可:autocomplete=”off”。
例如上面例子,改为如下就不会缓存啦:
<input type="text" autocomplete="off" value="">
<select autocomplete="off">
<option value="1">1</option>
<option value="2">1</option>
</select>
听说还有一种直接加在form表单里也可以,但是因为我已经很久没有用form表单提交数据啦,都是用ajax异步提交的,所以我就没有采取这种方法,也很简单的如下:
<form action="#" autocomplete="off">
<input type="text" value/>
</form>
当然,没试过不知道行不行,应该是没问题的!
*请认真填写需求信息,我们会在24小时内与您取得联系。