html
- 請始終將正斜槓添加到子文件夾。一般情況,依賴服務器配置。
- 主要問了區分訪問的是文件還是文件夾,比如訪問路徑爲
http://www.a.com/b
瀏覽器不知道訪問的是文件還是文件夾,會先訪問一遍確認是那種類型,如果是文件夾則會加上/,重新訪問地址爲http://www.a.com/b/
的路徑。 - 如果帶後綴名
http://www.a.com/b.html
可以明確知道訪問的是文件,不需要再次請求。
- 主要問了區分訪問的是文件還是文件夾,比如訪問路徑爲
- 每30秒鐘刷新當前頁面:
<meta http-equiv="refresh" content="30">
- 30秒後跳轉到百度:
<meta http-equiv="refresh" content="30" url="http://www.baidu.com">
- 圖片映射:給圖片某些區域添加熱區
<img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm">
<area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm">
<area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>
- 有序列表
<ol>
可定義type來設置不同的序號
<ol type="A"><li>a</li><li>b</li></ol>
- a
- b
<ol type="1" start="5"><li>a</li><li>b</li></ol>
- a
- b
<ol type="I"><li>a</li><li>b</li></ol>
- a
- b
<pre>
可保留文本原格式,而不主動刪除空格及空行。- 判斷是否支持js或js是否被禁用:
<noscript>抱歉,你的瀏覽器不支持 JavaScript!</noscript>
- 字符實體,大小寫敏感:http://www.runoob.com/tags/ref-entities.html
html5
- MathML 可利用MathML編輯器進行輔助。http://tool.oschina.net/mathml
- 拖放
- 視頻
<video>
- 音頻
<audio>
- 新的 Input 類型,目前主流瀏覽器很少全部支持
- Server-Sent 事件 - 單向消息傳遞,本質下載
if(typeof(EventSource)!=="undefined"){
var source=new EventSource("demo_sse.php");
source.onmessage=function(event){
document.getElementById("result").innerHTML+=event.data + "<br>";
};
}else{
document.getElementById("result").innerHTML="抱歉,你的瀏覽器不支持 server-sent 事件...";
}