HTTP協議是Hyper Text Transfer Protocol(超文本傳輸協議)的縮寫,是用於從萬維網(WWW:World Wide Web )服務器傳輸超文本到本地瀏覽器的傳送協議。javascript
HTTP是一個基於TCP/IP通訊協議來傳遞數據(HTML 文件, 圖片文件, 查詢結果等)。php
HTTP協議工做於客戶端-服務端架構上。瀏覽器做爲HTTP客戶端經過URL向HTTP服務端即WEB服務器發送全部請求。css
Web服務器有:Apache服務器,IIS服務器(Internet Information Services)等。html
Web服務器根據接收到的請求後,向客戶端發送響應信息。vue
HTTP默認端口號爲80,可是你也能夠改成8080或者其餘端口。html5
HTTP三點注意事項:java
下圖展現了HTTP協議通訊流程:node
HTTP是基於客戶端/服務端(C/S)的架構模型,經過一個可靠的連接來交換信息,是一個無狀態的請求/響應協議。python
一個HTTP"客戶端"是一個應用程序(Web瀏覽器或其餘任何客戶端),經過鏈接到服務器達到向服務器發送一個或多個HTTP的請求的目的。mysql
一個HTTP"服務器"一樣也是一個應用程序(一般是一個Web服務,如Apache Web服務器或IIS服務器等),經過接收客戶端的請求並向客戶端發送HTTP響應數據。
HTTP使用統一資源標識符(Uniform Resource Identifiers, URI)來傳輸數據和創建鏈接。
一旦創建鏈接後,數據消息就經過相似Internet郵件所使用的格式[RFC5322]和多用途Internet郵件擴展(MIME)[RFC2045]來傳送。
客戶端發送一個HTTP請求到服務器的請求消息包括如下格式:請求行(request line)、請求頭部(header)、空行和請求數據四個部分組成,下圖給出了請求報文的通常格式。
瀏覽器訪問http://www.runoob.com/http/http-tutorial.html請求消息內容:
GET http://www.runoob.com/http/http-tutorial.html HTTP/1.1
Host: www.runoob.com
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36 LBBROWSER
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Referer: http://www.runoob.com/http/http-tutorial.html
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-CN,zh;q=0.8
Cookie: __uid=22ebaa94c4c85d5bb897eec286316430; Hm_lvt_8e2a116daf0104a78d601f40a45c75b4=1531712410,1531712907,1531731129,1531875825; _gat_gtag_UA_84264393_2=1; SERVERID=3a4d90ce271dac423615bd00bfd9dc97|1538454183|1538454173; Hm_lvt_3eec0b7da6548cf07db3bc477ea905ee=1538403919,1538443038,1538446304,1538446308; Hm_lpvt_3eec0b7da6548cf07db3bc477ea905ee=1538454191; _ga=GA1.2.1982042162.1531825555; _gid=GA1.2.1749171910.1538324309
GET http://www.runoob.com/http/http-tutorial.html HTTP/1.1
解析:
請求方法:GET
URL:http://www.runoob.com/http/http-tutorial.html
協議版本:HTTP/1.1
Host: www.runoob.com
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36 LBBROWSER
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Referer: http://www.runoob.com/http/http-tutorial.html
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-CN,zh;q=0.8
Cookie: __uid=22ebaa94c4c85d5bb897eec286316430; Hm_lvt_8e2a116daf0104a78d601f40a45c75b4=1531712410,1531712907,1531731129,1531875825; _gat_gtag_UA_84264393_2=1; SERVERID=3a4d90ce271dac423615bd00bfd9dc97|1538454183|1538454173; Hm_lvt_3eec0b7da6548cf07db3bc477ea905ee=1538403919,1538443038,1538446304,1538446308; Hm_lpvt_3eec0b7da6548cf07db3bc477ea905ee=1538454191; _ga=GA1.2.1982042162.1531825555; _gid=GA1.2.1749171910.1538324309
Fiddler軟件解析:
請求數據爲能夠有,能夠沒有。
HTTP響應也由四個部分組成,分別是:狀態行、消息報頭、空行和響應正文。
瀏覽器訪問http://www.runoob.com/http/http-tutorial.html,服務器響應內容:
HTTP/1.1 200 OK Server: Tengine Content-Type: text/html Content-Length: 46318 Connection: keep-alive Date: Mon, 01 Oct 2018 07:22:39 GMT X-Powered-By: HHVM/3.28.1 Vary: Accept-Encoding Via: cache43.l2st3-1[0,200-0,H], cache25.l2st3-1[2,0], kunlun7.cn257[0,200-0,H], kunlun6.cn257[0,0] Age: 75638 Ali-Swift-Global-Savetime: 1538446306 X-Cache: HIT TCP_MEM_HIT dirn:1:11089010 X-Swift-SaveTime: Tue, 02 Oct 2018 02:11:46 GMT X-Swift-CacheTime: 86400 Timing-Allow-Origin: * EagleId: de551ac615384541979717849e <!Doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta property="qc:admins" content="465267610762567726375" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>HTTP 教程 | 菜鳥教程</title> <link rel='dns-prefetch' href='//s.w.org' /> <link rel="canonical" href="http://www.runoob.com/http/http-tutorial.html" /> <meta name="keywords" content="HTTP 教程,HTTP"> <meta name="description" content="HTTP 教程 HTTP協議(HyperText Transfer Protocol,超文本傳輸協議)是因特網上應用最爲普遍的一種網絡傳輸協議,全部的WWW文件都必須遵照這個標準。 HTTP是一個基於TCP/IP通訊協議來傳遞數據(HTML 文件, 圖片文件, 查詢結果等)。 內容列表 HTTP 簡介 本章節介紹了HTTP協議。 HTTP 消息結構 本章節介紹了HTTP消息結構 HTTP 方法 本章節介紹了HTTP的方法,包括.."> <link rel="shortcut icon" href="//static.runoob.com/images/favicon.ico" mce_href="//static.runoob.com/images/favicon.ico" type="image/x-icon" > <link rel="stylesheet" href="/wp-content/themes/runoob/style.css?v=1.147" type="text/css" media="all" /> <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" media="all" /> <!--[if gte IE 9]><!--> <script src="//cdn.bootcss.com/jquery/2.0.3/jquery.min.js"></script> <!--<![endif]--> <!--[if lt IE 9]> <script src="//cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script> <script src="//cdn.bootcss.com/html5shiv/r29/html5.min.js"></script> <![endif]--> <link rel="apple-touch-icon" href="//static.runoob.com/images/icon/mobile-icon.png"/> <meta name="apple-mobile-web-app-title" content="菜鳥教程"> </head> <body> <!-- 頭部 --> <div class="container logo-search"> <div class="col search row-search-mobile"> <form action="index.php"> <input class="placeholder" placeholder="搜索……" name="s" autocomplete="off"> </form> </div> <div class="row"> <div class="col logo"> <h1><a href="/">菜鳥教程 -- 學的不只是技術,更是夢想!</a></h1> </div> <div class="col right-list"> <button class="btn btn-responsive-nav btn-inverse" data-toggle="collapse" data-target=".nav-main-collapse" id="pull" style=""> <i class="fa fa-navicon"></i> </button> </div> <div class="col search search-desktop last"> <form action="//www.runoob.com/" target="_blank"> <input class="placeholder" id="s" name="s" placeholder="搜索……" autocomplete="off"> </form> </div> </div> </div> <!-- 導航欄 --> <!-- 導航欄 --> <div class="container navigation"> <div class="row"> <div class="col nav"> <ul class="pc-nav"> <li><a href="//www.runoob.com/">首頁</a></li> <li><a href="/html/html-tutorial.html">HTML</a></li> <li><a href="/css/css-tutorial.html">CSS</a></li> <li><a href="/js/js-tutorial.html">JavaScript</a></li> <li><a href="/jquery/jquery-tutorial.html">jQuery</a></li> <li><a href="/bootstrap/bootstrap-tutorial.html">Bootstrap</a></li> <li><a href="/sql/sql-tutorial.html">SQL</a></li> <li><a href="/mysql/mysql-tutorial.html">MySQL</a></li> <li><a href="/php/php-tutorial.html">PHP</a></li> <li><a href="/python/python-tutorial.html">Python2</a></li> <li><a href="/python3/python3-tutorial.html">Python3</a></li> <li><a href="/cprogramming/c-tutorial.html">C</a></li> <li><a href="/cplusplus/cpp-tutorial.html">C++</a></li> <li><a href="/csharp/csharp-tutorial.html">C#</a></li> <li><a href="/java/java-tutorial.html">Java</a></li> <li><a href="/browser-history">本地書籤</a></li> <!-- <li><a href="javascript:;" class="runoob-pop">登陸</a></li> --> </ul> <ul class="mobile-nav"> <li><a href="//www.runoob.com/">首頁</a></li> <li><a href="/html/html-tutorial.html">HTML</a></li> <li><a href="/css/css-tutorial.html">CSS</a></li> <li><a href="/js/js-tutorial.html">JS</a></li> <li><a href="/browser-history">本地書籤</a></li> <a href="javascript:void(0)" class="search-reveal">Search</a> </ul> </div> </div> </div><!-- 內容 --> <div class="container main"> <!-- 中間 --> <div class="row"> <div class="col left-column"> <div class="tab">HTTP 教程 <a data-cate="50" href="javascript:void(0);" title="夜間模式" id="moon"><i class="fa fa-moon-o" aria-hidden="true" style="font-size: 1.4em;float: right;margin: 4px 6px 0;"></i></a> <a data-cate="50" style="display:none;" href="javascript:void(0);" title="日間模式" id="sun" ><i class="fa fa-sun-o" aria-hidden="true" style="font-size: 1.4em;float: right;margin: 4px 6px 0;"></i></a> </div> <div class="sidebar-box gallery-list"> <div class="design" id="leftcolumn"> <a target="_top" title="HTTP 教程" href="/http/http-tutorial.html" > HTTP 教程 </a> <a target="_top" title="HTTP 簡介" href="/http/http-intro.html" > HTTP 簡介 </a> <a target="_top" title="HTTP 消息結構" href="/http/http-messages.html" > HTTP 消息結構 </a> <a target="_top" title="HTTP請求方法" href="/http/http-methods.html" > HTTP請求方法 </a> <a target="_top" title="HTTP 響應頭信息" href="/http/http-header-fields.html" > HTTP 響應頭信息 </a> <a target="_top" title="HTTP狀態碼" href="/http/http-status-codes.html" > HTTP狀態碼 </a> <a target="_top" title="HTTP content-type" href="/http/http-content-type.html" > HTTP content-type </a> </div> </div> </div> <div class="col middle-column"> <div class="article"> <div class="article-heading-ad" style="display: none;"> </div> <div class="previous-next-links"> <div class="previous-design-link"><i style="font-size:16px;" class="fa fa-arrow-left" aria-hidden="true"></i> <a href="http://www.runoob.com/http/http-status-codes.html" rel="prev"> HTTP狀態碼</a> </div> <div class="next-design-link"><a href="http://www.runoob.com/http/http-content-type.html" rel="next"> HTTP content-type</a> <i style="font-size:16px;" class="fa fa-arrow-right" aria-hidden="true"></i></div> </div> <div class="article-body"> <div class="article-intro" id="content"> <h1>HTTP 教程</h1><hr> <div class="tutintro"> <p>HTTP協議(HyperText Transfer Protocol,超文本傳輸協議)是因特網上應用最爲普遍的一種網絡傳輸協議,全部的WWW文件都必須遵照這個標準。</p> <p>HTTP是一個基於TCP/IP通訊協議來傳遞數據(HTML 文件, 圖片文件, 查詢結果等)。</p> </div> <hr> <h3><span style="text-decoration: underline;">內容列表</span></h3> <p><a href="/http/http-intro.html">HTTP 簡介</a><br> 本章節介紹了HTTP協議。</p> <p><a href="/http/http-messages.html">HTTP 消息結構</a><br> 本章節介紹了HTTP消息結構</p> <p><a href="/http/http-methods.html">HTTP 方法</a><br> 本章節介紹了HTTP的方法,包括 GET, POST, HEAD 等。</p> <p><a href="/http/http-header-fields.html">HTTP 頭信息</a><br> 本章節介紹了HTTP的頭信息</p> <p><a href="/http/http-status-codes.html">HTTP 狀態碼</a><br> 本章節列出了全部HTTP的狀態碼。</p> </div> </div> <div class="previous-next-links"> <div class="previous-design-link"><i style="font-size:16px;" class="fa fa-arrow-left" aria-hidden="true"></i> <a href="http://www.runoob.com/http/http-status-codes.html" rel="prev"> HTTP狀態碼</a> </div> <div class="next-design-link"><a href="http://www.runoob.com/http/http-content-type.html" rel="next"> HTTP content-type</a> <i style="font-size:16px;" class="fa fa-arrow-right" aria-hidden="true"></i></div> </div> <!-- 筆記列表 --> <style> .wrapper { /*text-transform: uppercase; */ background: #ececec; color: #555; cursor: help; font-family: "Gill Sans", Impact, sans-serif; font-size: 20px; position: relative; text-align: center; width: 200px; -webkit-transform: translateZ(0); /* webkit flicker fix */ -webkit-font-smoothing: antialiased; /* webkit text rendering fix */ } .wrapper .tooltip { white-space: nowrap; font-size: 14px; text-align: left; background: #96b97d; bottom: 100%; color: #fff; display: block; left: -25px; margin-bottom: 15px; opacity: 0; padding: 14px; pointer-events: none; position: absolute; -webkit-transform: translateY(10px); -moz-transform: translateY(10px); -ms-transform: translateY(10px); -o-transform: translateY(10px); transform: translateY(10px); -webkit-transition: all .25s ease-out; -moz-transition: all .25s ease-out; -ms-transition: all .25s ease-out; -o-transition: all .25s ease-out; transition: all .25s ease-out; -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); -ms-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); -o-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); } .tooltip a { color:#fff; } /* This bridges the gap so you can mouse into the tooltip without it disappearing */ .wrapper .tooltip:before { bottom: -20px; content: " "; display: block; height: 20px; left: 0; position: absolute; width: 100%; } /* CSS Triangles - see Trevor's post */ .wrapper .tooltip:after { border-left: solid transparent 10px; border-right: solid transparent 10px; border-top: solid #96b97d 10px; bottom: -10px; content: " "; height: 0; left: 20%; margin-left: -13px; position: absolute; width: 0; } .wrapper .tooltip1 { margin-left: 50px; padding-top: 0px; } .wrapper:hover .tooltip { opacity: 1; pointer-events: auto; -webkit-transform: translateY(0px); -moz-transform: translateY(0px); -ms-transform: translateY(0px); -o-transform: translateY(0px); transform: translateY(0px); } /* IE can just show/hide with no transition */ .lte8 .wrapper .tooltip { display: none; } .lte8 .wrapper:hover .tooltip { display: block; } </style> <div id="respond" class="no_webshot"> <div class="comment-signarea" style=" padding: 20px 20px;"> <h3 class="text-muted" id="share_code" style="color: #799961;"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 點我分享筆記</h3> <!-- <p style="font-size:14px;">筆記須要是本篇文章的內容擴展!</p><br> <p style="font-size:12px;"><a href="//www.runoob.com/tougao" target="_blank">文章投稿,可點擊這裏</a></p> <p style="font-size:14px;"><a href="/w3cnote/runoob-user-test-intro.html#invite" target="_blank">註冊邀請碼獲取方式</a></p> <h3 class="text-muted"><i class="fa fa-info-circle" aria-hidden="true"></i> 分享筆記前必須<a href="javascript:;" class="runoob-pop">登陸</a>!</h3> <p><a href="/w3cnote/runoob-user-test-intro.html#invite" target="_blank">註冊邀請碼獲取方式</a></p>--> </div> <form action="/wp-content/themes/runoob/option/addnote.php" method="post" id="commentform" style="display:none;"> <div class="comt"> <div class="comt-title"> <i style="font-size:36px;" class="fa fa-user-circle" aria-hidden="true"></i> <p><a id="cancel-comment-reply-link" href="javascript:;">取消</a></p> </div> <div class="comt-box"> <div id="mded"></div> <div class="comt-ctrl"> <div class="comt-tips"><input type='hidden' name='comment_post_ID' value='4108' id='comment_post_ID' /> <input type='hidden' name='comment_parent' id='comment_parent' value='0' /> </div> <button type="submit" name="submit" id="submit" tabindex="5"><i class="fa fa-pencil" aria-hidden="true"></i> 分享筆記</button> </div> </div> <div class="comt-comterinfo"> <ul id="comment-author-info"> <li class="form-inline"><label class="hide" for="author">暱稱</label><input class="ipt" type="text" name="author" id="author" value="" tabindex="2" placeholder="暱稱"><span class="text-muted">暱稱 (必填)</span></li> <li class="form-inline"><label class="hide" for="email">郵箱</label><input class="ipt" type="text" name="email" id="email" value="" tabindex="3" placeholder="郵箱"><span class="text-muted">郵箱 (必填)</span></li> <li class="form-inline"><label class="hide" for="url">引用地址</label><input class="ipt" type="text" name="url" id="url" value="" tabindex="4" placeholder="引用地址"><span class="text-muted">引用地址</span></li> </ul> </div> </div> </form> </div> <script type="text/javascript"> $(function() { //初始化編輯器 var editor = new Simditor({ textarea: $('#mded'), placeholder: '寫筆記...', upload:false, // upload: {url:'/api/comment_upload_file.php',params: null,fileKey: 'upload_file',connectionCount: 1,leaveConfirm: '文件正在上傳,您肯定離開?'}, defaultImage: 'http://www.runoob.com/images/logo.png', codeLanguages: '', toolbar: [ 'bold','code','ul','ol','image' ] }); editor.on('selectionchanged', function() { $(".code-popover").hide(); }); // 提交數據 $("#share_code").click(function() { $(".comment-signarea").hide(); $("#commentform").show(); }); $("#user_add_note").click(function() { $(".comment-signarea").hide(); $("#commentform").show(); $('html, body').animate({ scrollTop: $("#respond").offset().top }, 200); }); // 提交筆記 var commentform=$('#commentform'); commentform.prepend('<div id="comment-status" style="display:none;" ></div>'); var statusdiv=$('#comment-status'); commentform.submit(function(e){ e.preventDefault(); var noteContent = editor.getValue(); // console.log(noteContent); noteContent = noteContent.replace(/<pre><code>/g,"<pre>"); noteContent = noteContent.replace(/<\/code><\/pre>/g,"</pre>"); // 系列化表單數據 var comment_parent = 0; var is_user_logged_in = $("#is_user_logged_in").val(); var comment_post_ID = 4108; var _wp_unfiltered_html_comment = $("#_wp_unfiltered_html_comment").val(); var comment = noteContent; var author = $("#author").val(); var url = $("#url").val(); var email = $("#email").val(); if(isBlank(author) && is_user_logged_in==0) { statusdiv.html('<p class="ajax-error">請輸入暱稱!</p>').show(); } else if(isBlank(email) && is_user_logged_in==0) { statusdiv.html('<p class="ajax-error">請輸入郵箱!</p>').show(); } else { // var formdata=commentform.serialize() + "&comment=" + noteContent ; // 添加狀態信息 statusdiv.html('<p>Processing...</p>').show(); // 獲取表單提交地址 var formurl=commentform.attr('action'); // 異步提交 $.ajax({ type: 'post', url: formurl, dataType:'json', data: {"comment_parent":comment_parent,"comment_post_ID":comment_post_ID, "_wp_unfiltered_html_comment":_wp_unfiltered_html_comment,"comment":comment,"url":url, "email":email,"author":author}, error: function(XMLHttpRequest, textStatus, errorThrown){ statusdiv.html('<p class="ajax-error" >數據不完整或表單提交太快了!</p>').show(); }, success: function(data, textStatus){ if(data.errorno=="0") { $("#submit").prop('disabled', true); statusdiv.html('<p class="ajax-success" >筆記已提交審覈,感謝分享筆記!</p>').show(); alert('筆記已提交審覈,感謝分享筆記!'); }else{ statusdiv.html('<p class="ajax-error" >'+data.msg+'</p>').show(); } commentform.find('textarea[name=comment]').val(''); } }); setTimeout(function(){ $("#submit").prop('disabled', false); }, 10*1000); } return false; }); }); function isBlank(str) { return (!str || /^\s*$/.test(str)); } </script> <link rel="stylesheet" href="/wp-content/themes/runoob/assets/css/qa.css?1.42"> <link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/simditor/2.3.6/styles/simditor.min.css" /> <script type="text/javascript" src="//static.runoob.com/assets/simditor/2.3.6/scripts/module.js"></script> <script type="text/javascript" src="//static.runoob.com/assets/simditor/2.3.6/scripts/hotkeys.js"></script> <script type="text/javascript" src="//static.runoob.com/assets/simditor/2.3.6/scripts/uploader.js"></script> <script type="text/javascript" src="//cdn.bootcss.com/simditor/2.3.6/lib/simditor.min.js"></script> <div class="sidebar-box ad-box ad-box-large"> <div id="ad-336280" class="ad-336280"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- 移動版 自動調整 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5751451760833794" data-ad-slot="1691338467" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> </div> <!-- 右邊欄 --> <div class="fivecol last right-column"> <!-- <div class="tab tab-light-blue" style="text-align: center;">關注微信</div> <div class="sidebar-box"> <a href="http://m.runoob.com/" target="_blank"> <img src="http://www.runoob.com/wp-content/themes/w3cschool.cc/assets/img/qrcode.jpg" alt="移動版"> </a> <div class="qqinfo"> <a target="_blank" href="http://jq.qq.com/?_wv=1027&k=dOwwKN" id="qqhref"> <img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="菜鳥家族" title="菜鳥家族"></a> <span>(羣號:<span id="qqid">365967760</span>)</span> </div> </div> --> <style> .sidebar-tree .double-li { width:300px; } .sidebar-tree .double-li li { width: 44%; line-height: 1.5em; border-bottom: 1px solid #ccc; float: left; display: inline; } </style> <div class="sidebar-box ad-box ad-box-large"> <div class="sidebar-box advertise-here" style="margin: 0 auto;"> <a href="javascript:void(0);" style="font-size: 16px; color:#64854c;font-weight:bold;"> <i class="fa fa-list" aria-hidden="true"></i> 分類導航</a> </div> <div class="sidebar-box sidebar-cate"> <div class="sidebar-tree" > <ul><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> HTML / CSS</a><ul class="double-li"><li><a title="HTML 教程" href="//www.runoob.com/html/html-tutorial.html">HTML 教程</a></li><li><a title="HTML5 教程" href="//www.runoob.com/html/html5-intro.html">HTML5 教程</a></li><li><a title="CSS 教程" href="//www.runoob.com/css/css-tutorial.html">CSS 教程</a></li><li><a title="CSS3 教程" href="//www.runoob.com/css3/css3-tutorial.html">CSS3 教程</a></li><li><a title="Bootstrap3 教程" href="//www.runoob.com/bootstrap/bootstrap-tutorial.html">Bootstrap3 教程</a></li><li><a title="Bootstrap4 教程" href="//www.runoob.com/bootstrap4/bootstrap4-tutorial.html">Bootstrap4 教程</a></li><li><a title="Font Awesome 教程" href="//www.runoob.com/font-awesome/fontawesome-tutorial.html">Font Awesome 教程</a></li><li><a title="Foundation 教程" href="//www.runoob.com/foundation/foundation-tutorial.html">Foundation 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> JavaScript</a><ul class="double-li"><li><a title="JavaScript 教程" href="//www.runoob.com/js/js-tutorial.html">JavaScript 教程</a></li><li><a title="HTML DOM 教程" href="//www.runoob.com/htmldom/htmldom-tutorial.html">HTML DOM 教程</a></li><li><a title="jQuery 教程" href="//www.runoob.com/jquery/jquery-tutorial.html">jQuery 教程</a></li><li><a title="AngularJS 教程" href="//www.runoob.com/angularjs/angularjs-tutorial.html">AngularJS 教程</a></li><li><a title="AngularJS2 教程" href="//www.runoob.com/angularjs2/angularjs2-tutorial.html">AngularJS2 教程</a></li><li><a title="Vue.js 教程" href="//www.runoob.com/vue2/vue-tutorial.html">Vue.js 教程</a></li><li><a title="React 教程" href="//www.runoob.com/react/react-tutorial.html">React 教程</a></li><li><a title="jQuery UI 教程" href="//www.runoob.com/jqueryui/jqueryui-tutorial.html">jQuery UI 教程</a></li><li><a title="jQuery EasyUI 教程" href="//www.runoob.com/jeasyui/jqueryeasyui-tutorial.html">jQuery EasyUI 教程</a></li><li><a title="Node.js 教程" href="//www.runoob.com/nodejs/nodejs-tutorial.html">Node.js 教程</a></li><li><a title="AJAX 教程" href="//www.runoob.com/ajax/ajax-tutorial.html">AJAX 教程</a></li><li><a title="JSON 教程" href="//www.runoob.com/json/json-tutorial.html">JSON 教程</a></li><li><a title="Highcharts 教程" href="//www.runoob.com/highcharts/highcharts-tutorial.html">Highcharts 教程</a></li><li><a title="Google 地圖 教程" href="//www.runoob.com/googleapi/google-maps-basic.html">Google 地圖 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 服務端</a><ul class="double-li"><li><a title="PHP 教程" href="//www.runoob.com/php/php-tutorial.html">PHP 教程</a></li><li><a title="Python 教程" href="//www.runoob.com/python/python-tutorial.html">Python 教程</a></li><li><a title="Python3 教程" href="//www.runoob.com/python3/python3-tutorial.html">Python3 教程</a></li><li><a title="Django 教程" href="//www.runoob.com/django/django-tutorial.html">Django 教程</a></li><li><a title="Linux 教程" href="//www.runoob.com/linux/linux-tutorial.html">Linux 教程</a></li><li><a title="Docker 教程" href="//www.runoob.com/docker/docker-tutorial.html">Docker 教程</a></li><li><a title="Ruby 教程" href="//www.runoob.com/ruby/ruby-tutorial.html">Ruby 教程</a></li><li><a title="Java 教程" href="//www.runoob.com/java/java-tutorial.html">Java 教程</a></li><li><a title="C 教程" href="//www.runoob.com/c/c-tutorial.html">C 教程</a></li><li><a title="C++ 教程" href="//www.runoob.com/cplusplus/cpp-tutorial.html">C++ 教程</a></li><li><a title="Perl 教程" href="//www.runoob.com/perl/perl-tutorial.html">Perl 教程</a></li><li><a title="Servlet 教程" href="//www.runoob.com/servlet/servlet-tutorial.html">Servlet 教程</a></li><li><a title="JSP 教程" href="//www.runoob.com/jsp/jsp-tutorial.html">JSP 教程</a></li><li><a title="Lua 教程" href="//www.runoob.com/lua/lua-tutorial.html">Lua 教程</a></li><li><a title="Scala 教程" href="//www.runoob.com/scala/scala-tutorial.html">Scala 教程</a></li><li><a title="Go 教程" href="//www.runoob.com/go/go-tutorial.html">Go 教程</a></li><li><a title="設計模式" href="//www.runoob.com/design-pattern/design-pattern-tutorial.html">設計模式</a></li><li><a title="正則表達式" href="//www.runoob.com/regexp/regexp-tutorial.html">正則表達式</a></li><li><a title="Maven 教程" href="//www.runoob.com/maven/maven-tutorial.html">Maven 教程</a></li><li><a title="ASP 教程" href="//www.runoob.com/asp/asp-tutorial.html">ASP 教程</a></li><li><a title="AppML 教程" href="//www.runoob.com/appml/appml-tutorial.html">AppML 教程</a></li><li><a title="VBScript 教程" href="//www.runoob.com/vbscript/vbscript-tutorial.html">VBScript 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 數據庫</a><ul class="double-li"><li><a title="SQL 教程" href="//www.runoob.com/sql/sql-tutorial.html">SQL 教程</a></li><li><a title="Mysql 教程" href="//www.runoob.com/mysql/mysql-tutorial.html">Mysql 教程</a></li><li><a title="SQLite 教程" href="//www.runoob.com/sqlite/sqlite-tutorial.html">SQLite 教程</a></li><li><a title="MongoDB 教程" href="//www.runoob.com/mongodb/mongodb-tutorial.html">MongoDB 教程</a></li><li><a title="Redis 教程" href="//www.runoob.com/redis/redis-tutorial.html">Redis 教程</a></li><li><a title="Memcached 教程" href="//www.runoob.com/Memcached/Memcached-tutorial.html">Memcached 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 移動端</a><ul class="double-li"><li><a title="Android 教程" href="//www.runoob.com/w3cnote/android-tutorial-intro.html">Android 教程</a></li><li><a title="Swift 教程" href="//www.runoob.com/swift/swift-tutorial.html">Swift 教程</a></li><li><a title="jQuery Mobile 教程" href="//www.runoob.com/jquerymobile/jquerymobile-tutorial.html">jQuery Mobile 教程</a></li><li><a title="ionic 教程" href="//www.runoob.com/ionic/ionic-tutorial.html">ionic 教程</a></li><li><a title="Kotlin 教程" href="//www.runoob.com/kotlin/kotlin-tutorial.html">Kotlin 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> XML 教程</a><ul class="double-li"><li><a title="XML 教程" href="//www.runoob.com/xml/xml-tutorial.html">XML 教程</a></li><li><a title="DTD 教程" href="//www.runoob.com/dtd/dtd-tutorial.html">DTD 教程</a></li><li><a title="XML DOM 教程" href="//www.runoob.com/dom/dom-tutorial.html">XML DOM 教程</a></li><li><a title="XSLT 教程" href="//www.runoob.com/xsl/xsl-tutorial.html">XSLT 教程</a></li><li><a title="XPath 教程" href="//www.runoob.com/xpath/xpath-tutorial.html">XPath 教程</a></li><li><a title="XQuery 教程" href="//www.runoob.com/xquery/xquery-tutorial.html">XQuery 教程</a></li><li><a title="XLink 教程" href="//www.runoob.com/xlink/xlink-tutorial.html">XLink 教程</a></li><li><a title="XPointer 教程" href="//www.runoob.com/xlink/xlink-tutorial.html">XPointer 教程</a></li><li><a title="XML Schema 教程" href="//www.runoob.com/schema/schema-tutorial.html">XML Schema 教程</a></li><li><a title="XSL-FO 教程" href="//www.runoob.com/xslfo/xslfo-tutorial.html">XSL-FO 教程</a></li><li><a title="SVG 教程" href="//www.runoob.com/svg/svg-tutorial.html">SVG 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> ASP.NET</a><ul class="double-li"><li><a title="ASP.NET 教程" href="//www.runoob.com/aspnet/aspnet-tutorial.html">ASP.NET 教程</a></li><li><a title="C# 教程" href="//www.runoob.com/csharp/csharp-tutorial.html">C# 教程</a></li><li><a title="Web Pages 教程" href="//www.runoob.com/aspnet/webpages-intro.html">Web Pages 教程</a></li><li><a title="Razor 教程" href="//www.runoob.com/aspnet/razor-intro.html">Razor 教程</a></li><li><a title="MVC 教程" href="//www.runoob.com/aspnet/mvc-intro.html">MVC 教程</a></li><li><a title="Web Forms 教程" href="//www.runoob.com/aspnet/aspnet-intro.html">Web Forms 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> Web Service</a><ul class="double-li"><li><a title="Web Service 教程" href="//www.runoob.com/webservices/webservices-tutorial.html">Web Service 教程</a></li><li><a title="WSDL 教程" href="//www.runoob.com/wsdl/wsdl-tutorial.html">WSDL 教程</a></li><li><a title="SOAP 教程" href="//www.runoob.com/soap/soap-tutorial.html">SOAP 教程</a></li><li><a title="RSS 教程" href="//www.runoob.com/rss/rss-tutorial.html">RSS 教程</a></li><li><a title="RDF 教程" href="//www.runoob.com/rdf/rdf-tutorial.html">RDF 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 開發工具</a><ul class="double-li"><li><a title="Eclipse 教程" href="//www.runoob.com/eclipse/eclipse-tutorial.html">Eclipse 教程</a></li><li><a title="Git 教程" href="//www.runoob.com/git/git-tutorial.html">Git 教程</a></li><li><a title="Svn 教程" href="//www.runoob.com/svn/svn-tutorial.html">Svn 教程</a></li><li><a title="Firebug 教程" href="//www.runoob.com/firebug/firebug-tutorial.html">Firebug 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 網站建設</a><ul class="double-li"><li><a title="HTTP 教程" href="//www.runoob.com/http/http-tutorial.html">HTTP 教程</a></li><li><a title="網站建設指南" href="//www.runoob.com/web/web-buildingprimer.html">網站建設指南</a></li><li><a title="瀏覽器信息" href="//www.runoob.com/browsers/browser-information.html">瀏覽器信息</a></li><li><a title="網站主機教程" href="//www.runoob.com/hosting/hosting-tutorial.html">網站主機教程</a></li><li><a title="TCP/IP 教程" href="//www.runoob.com/tcpip/tcpip-tutorial.html">TCP/IP 教程</a></li><li><a title="W3C 教程" href="//www.runoob.com/w3c/w3c-tutorial.html">W3C 教程</a></li><li><a title="網站品質" href="//www.runoob.com/quality/quality-tutorial.html">網站品質</a></li></ul></li></ul> </div> </div> </div> <br> <div class="sidebar-box ad-box ad-box-large"> <div class="sidebar-box advertise-here"> <a href="javascript:void(0);">Advertisement</a> </div> <div class="ad-600160" id="sidebar-right-ads"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- 側欄1 --> <ins class="adsbygoogle" style="display:inline-block;width:160px;height:600px" data-ad-client="ca-pub-5751451760833794" data-ad-slot="4106274865"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div></div> </div> <script> var aid = 4108; function coll() { $.post( '/wp-content/themes/runoob/option/user/userinfo.php', {aid:aid, action:"collarticle", opt:'add'},function( data ) { if(data.error==0) { $("#content").find("h1:first").find("a").attr("href","javascript:void(0);"); $("#content").find("h1:first").find("img").attr("src","http://www.runoob.com/wp-content/themes/runoob/assets/img/coll2.png").css({width:32+"px",height:32+"px"}); } alert(data.msg); },'json'); } </script> <!-- 反饋對話框開始 --> <script src="/wp-content/themes/runoob/assets/feedback/stable/2.0/feedback.js?1.0"></script> <link rel="stylesheet" href="/wp-content/themes/runoob/assets/feedback/stable/2.0/feedback.css?1.0" /> <script type="text/javascript"> $.feedback({ ajaxURL: '/feedback/runoob_feedback.php', html2canvasURL: '/wp-content/themes/runoob/assets/feedback/stable/2.0/html2canvas.js' }); </script> <!-- 反饋對話框結束 --> <button class="feedback-btn feedback-btn-gray">反饋/建議</button> <!-- 底部 --> <div id="footer" class="mar-t50"> <div class="runoob-block"> <div class="runoob cf"> <dl> <dt> 在線實例 </dt> <dd> ·<a target="_blank" href="/html/html-examples.html">HTML 實例</a> </dd> <dd> ·<a target="_blank" href="/css/css-examples.html">CSS 實例</a> </dd> <dd> ·<a target="_blank" href="/js/js-examples.html">JavaScript 實例</a> </dd> <dd> ·<a target="_blank" href="/ajx/ajax-examples.html">Ajax 實例</a> </dd> <dd> ·<a target="_blank" href="/jquery/jquery-examples.html">jQuery 實例</a> </dd> <dd> ·<a target="_blank" href="/xml/xml-examples.html">XML 實例</a> </dd> <dd> ·<a target="_blank" href="/java/java-examples.html">Java 實例</a> </dd> </dl> <dl> <dt> 字符集&工具 </dt> <dd> · <a target="_blank" href="/charsets/html-charsets.html">HTML 字符集設置</a> </dd> <dd> · <a target="_blank" href="/tags/html-ascii.html">HTML ASCII 字符集</a> </dd> <dd> · <a target="_blank" href="/tags/ref-entities.html">HTML ISO-8859-1</a> </dd> <dd> · <a target="_blank" href="/tags/html-symbols.html">HTML 實體符號</a> </dd> <dd> · <a target="_blank" href="/tags/html-colorpicker.html">HTML 拾色器</a> </dd> <dd> · <a target="_blank" href="//c.runoob.com/front-end/53">JSON 格式化工具</a> </dd> </dl> <dl> <dt> 最新更新 </dt> <dd> · <a href="http://www.runoob.com/w3cnote/php-phpmailer.html" title="PHP 使用 phpmailer 發送電子郵件">PHP 使用 phpmai...</a> </dd> <dd> · <a href="http://www.runoob.com/w3cnote/warning-this-program-uses-gets-which-is-unsafe.html" title="C 中使用 gets() 提示 warning: this program uses gets(), which is unsafe.">C 中使用 gets()...</a> </dd> <dd> · <a href="http://www.runoob.com/python3/python3-func-input.html" title="Python3 input() 函數">Python3 input()...</a> </dd> <dd> · <a href="http://www.runoob.com/w3cnote/summary-of-network.html" title="計算機網絡基礎知識總結">計算機網絡基礎...</a> </dd> <dd> · <a href="http://www.runoob.com/vue2/vue-examples.html" title="Vue.js 實例">Vue.js 實例</a> </dd> <dd> · <a href="http://www.runoob.com/python3/ref-set-update.html" title="Python Set update() 方法">Python Set upda...</a> </dd> <dd> · <a href="http://www.runoob.com/python3/ref-set-union.html" title="Python Set union() 方法">Python Set unio...</a> </dd> </dl> <dl> <dt> 站點信息 </dt> <dd> · <a target="_blank" href="//mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=ssbDyoOAgfLU3crf09venNHd3w" rel="external nofollow">意見反饋</a> <!--<a class="wxpopup" onclick="popFunction()">合做聯繫 <span class="popuptext" id="myPopup">微信:<strong>centos5</strong></span> </a>--> </dd> <dd> · <a target="_blank" href="/disclaimer">免責聲明</a> </dd> <!-- <dd style="display: block;"> · <a href="javascript:void(0)" onclick="dashangToggle()" style="font-weight:bold;color:#f00;" title="打賞,支持一下">打賞一下</a> </dd> --> <dd> · <a target="_blank" href="/aboutus">關於咱們</a> </dd> <dd> · <a target="_blank" href="/archives">文章歸檔</a> </dd> <!-- <dd> · <a href="https://www.xiaoyouxi100.com/?from=runoob" onclick="_hmt.push(['_trackEvent', '小遊戲', 'click', 'xiaoyouxi100']);" target="_blank" title="小遊戲">小遊戲</a> </dd> --> </dl> <div class="search-share"> <div class="app-download"> <div> <strong>關注微信</strong> </div> </div> <div class="share"> <img width="128" height="128" src="/wp-content/themes/runoob/assets/images/qrcode.png" /> </div> </div> </div> </div> <div class="w-1000 copyright"> Copyright © 2013-2018 <strong><a href="//www.runoob.com/" target="_blank">菜鳥教程</a></strong> <strong><a href="//www.runoob.com/" target="_blank">runoob.com</a></strong> All Rights Reserved. 備案號:閩ICP備15012807號-1 </div> </div> <div class="fixed-btn"> <a class="go-top" href="javascript:void(0)" title="返回頂部"> <i class="fa fa-angle-up"></i></a> <a class="qrcode" href="javascript:void(0)" title="關注咱們"><i class="fa fa-qrcode"></i></a> <a class="writer" style="display:none" href="javascript:void(0)" title="標記/收藏"><i class="fa fa-star" aria-hidden="true"></i></a> <!-- qrcode modal --> <div id="bottom-qrcode" class="modal panel-modal hide fade in"> <h4>微信關注</h4> <div class="panel-body"><img alt="微信關注" width="128" height="128" src="/wp-content/themes/runoob/assets/images/qrcode.png"></div> </div> </div> <div class="hide_box"></div> <div class="shang_box"> <a class="shang_close" href="javascript:void(0)" onclick="dashangToggle()" title="關閉"><img src="//static.runoob.com/images/dashang/close.jpg" alt="取消" /></a> <div class="shang_tit"> <p>感謝您的支持,我會繼續努力的!</p> </div> <div class="shang_payimg"> <img src="//static.runoob.com/images/dashang/weipayimg.png" alt="掃碼支持" title="掃一掃" /> </div> <div class="pay_explain">掃碼打賞,你說多少就多少</div> <div class="shang_payselect"> <div class="pay_item checked" data-id="weipay"> <span class="radiobox"></span> <span class="pay_logo"><img src="//static.runoob.com/images/dashang/wechat.jpg" alt="微信" /></span> </div> <div class="pay_item" data-id="alipay"> <span class="radiobox"></span> <span class="pay_logo"><img src="//static.runoob.com/images/dashang/alipay.jpg" alt="支付寶" /></span> </div> </div> <div class="shang_info"> <p>打開<span id="shang_pay_txt">支付寶</span>掃一掃,便可進行掃碼打賞哦</p> <p><a href="//c.runoob.com/codedemo/5348" target="_blank"><span style=" font-size: 14px;color: #000;font-weight: bold;">點我查看本站打賞源碼!</span></a></p> </div> </div> <div id="testClick"></div> <div style="display:none;"> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?3eec0b7da6548cf07db3bc477ea905ee"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-84264393-2"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-84264393-2'); </script> </div> <script> window.jsui={ www: '//wwww.runoob.com', uri: '//www.runoob.com/wp-content/themes/runoob' }; </script> <style> ol,ul{list-style:none}.cd-switcher a{text-decoration:none;outline:0}.cd-switcher a:hover{text-decoration:underline}a:focus{outline:0;-moz-outline:0}.main_nav{width:300px;height:60px;margin:60px auto 10px auto}.main_nav li{float:left;width:60px;margin-right:10px;font-size:16px;padding:.6em 1em;border-radius:3em;background:#2f889a;text-align:center}.main_nav li a{color:#fff}.errtip{background-color:#fceaea;color:#db5353;padding:8px 15px;font-size:14px;border:1px solid #fc9797;border-radius:5px}.cd-user-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(52,54,66,0.9);z-index:3;overflow-y:auto;cursor:pointer;visibility:hidden;opacity:0;-webkit-transition:opacity .3s 0,visibility 0 .3s;-moz-transition:opacity .3s 0,visibility 0 .3s;transition:opacity .3s 0,visibility 0 .3s}.cd-user-modal.is-visible{visibility:visible;opacity:1;-webkit-transition:opacity .3s 0,visibility 0 0;-moz-transition:opacity .3s 0,visibility 0 0;transition:opacity .3s 0,visibility 0 0}.cd-user-modal.is-visible .cd-user-modal-container{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}.cd-user-modal-container{position:relative;width:90%;max-width:500px;background:#FFF;margin:3em auto 4em;cursor:auto;border-radius:.25em;-webkit-transform:translateY(-30px);-moz-transform:translateY(-30px);-ms-transform:translateY(-30px);-o-transform:translateY(-30px);transform:translateY(-30px);-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;transition-property:transform;-webkit-transition-duration:.3s;-moz-transition-duration:.3s;transition-duration:.3s}.cd-user-modal-container .cd-switcher:after{content:"";display:table;clear:both}.cd-user-modal-container .cd-switcher li{width:50%;float:left;text-align:center}.cd-user-modal-container .cd-switcher li:first-child a{border-radius:.25em 0 0 0}.cd-user-modal-container .cd-switcher li:last-child a{border-radius:0 .25em 0 0}.cd-user-modal-container .cd-switcher a{font-size:1.2em;font-weight:bold;display:block;width:100%;height:50px;line-height:50px;background:#e8f1e2;color:#96b880}.cd-user-modal-container .cd-switcher a.selected{background:#FFF;color:#505260}@media only screen and (min-width:600px){.cd-user-modal-container{margin:4em auto}.cd-user-modal-container .cd-switcher a{height:70px;line-height:70px}}.cd-form{padding:1.4em}.cd-form .fieldset{position:relative;margin:1.4em 0}.cd-form .fieldset:first-child{margin-top:0}.cd-form .fieldset:last-child{margin-bottom:0}.cd-form label{font-size:16px;font-size:.875rem}.cd-form label.image-replace{display:inline-block;position:absolute;left:15px;top:50%;bottom:auto;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);height:20px;width:20px;overflow:hidden;text-indent:100%;white-space:nowrap;color:transparent;text-shadow:none;background-repeat:no-repeat;background-position:50% 0}.cd-form label.cd-username{background-image:url("/wp-content/themes/runoob/assets/img/cd-icon-username.svg")}.cd-form label.cd-email{background-image:url("/wp-content/themes/runoob/assets/img/cd-icon-email.svg")}.cd-form label.cd-password{background-image:url("/wp-content/themes/runoob/assets/img/cd-icon-password.svg")}.cd-form input{margin:0;padding:0;border-radius:.25em}.cd-form input.full-width{width:80%}.cd-form input.full-width2{width:94%}.cd-form input.has-padding{padding:12px 20px 12px 50px}.cd-form input.has-border{border:1px solid #d2d8d8;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none}.cd-form input.has-border:focus{border-color:#98b880;box-shadow:0 0 5px rgba(52,54,66,0.1);outline:0}.cd-form input.has-error{border:1px solid #d76666}.cd-form input[type=password]{padding-right:65px}.cd-form input[type=submit]{padding:16px 0;cursor:pointer;background:#96b97d;color:#FFF;font-weight:bold;border:0;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none;font-size:1.2em;font-weight:bold}.no-touch .cd-form input[type=submit]:hover,.no-touch .cd-form input[type=submit]:focus{background:#3599ae;outline:0}@media only screen and (min-width:600px){.cd-form{padding:2em}.cd-form .fieldset{margin:2em 0}.cd-form .fieldset:first-child{margin-top:0}.cd-form .fieldset:last-child{margin-bottom:0}.cd-form input.has-padding{padding:16px 20px 16px 50px}.cd-form input[type=submit]{padding:16px 0}}.cd-close-form{display:block;position:absolute;width:40px;height:40px;right:0;top:-40px;background:url("/wp-content/themes/runoob/assets/img/cd-icon-close.svg") no-repeat center center;text-indent:100%;white-space:nowrap;overflow:hidden}@media only screen and (min-width:1170px){}#cd-login,#cd-signup,#cd-reset-password{display:none}#cd-login.is-selected,#cd-signup.is-selected,#cd-reset-password.is-selected{display:block} </style> <div class="cd-user-modal"> <div class="cd-user-modal-container"> <ul class="cd-switcher"> <li><a href="javascript:;">用戶登陸</a></li> <li><a href="javascript:;">註冊新用戶</a></li> </ul> <div id="cd-login"> <!-- 登陸表單 --> <div class="cd-form"> <p class="fieldset"> <label class="image-replace cd-username" for="signin-username">用戶名</label> <input class="full-width has-padding has-border" id="signin-username" name=username type="text" placeholder="輸入用戶名"> </p> <p class="fieldset"> <label class="image-replace cd-password" for="signin-password">密碼</label> <input class="full-width has-padding has-border" id="signin-password" name="password" type="password" placeholder="輸入密碼"> </p> <p class="fieldset"> <input type="checkbox" id="remember-me" checked> <label for="remember-me">記住登陸狀態</label> <a href="//www.runoob.com/reset-password" style="float: right;padding-right: 20px;" target="_blank">忘記密碼?</a> </p> <input type="hidden" name="action" value="signin"> <p class="fieldset"> <input class="full-width2" type="submit" value="登 錄"> </p> <div class="err-msg"></div> </div> </div> <div id="cd-signup"> <!-- 註冊表單 --> <div class="cd-form"> <p class="fieldset"> <label class="image-replace cd-password" for="verifycode">邀請碼</label> <input class="full-width has-padding has-border" id="signup-verifycode" name="verifycode" type="text" placeholder="輸入邀請碼"> </p> <p class="fieldset"> <label class="image-replace cd-username" for="signup-username">用戶名</label> <input class="full-width has-padding has-border" id="signup-username" name="name" type="text" placeholder="輸入用戶名"> </p> <p class="fieldset"> <label class="image-replace cd-email" for="signup-email">郵箱</label> <input class="full-width has-padding has-border" name="email" id="signup-email" type="email" placeholder="輸入mail"> </p> <p class="fieldset"> <label class="image-replace cd-password" for="signup-password">密碼</label> <input class="full-width has-padding has-border" id="signup-password" name="password" type="password" placeholder="輸入密碼"> </p> <p class="fieldset"> <label class="image-replace cd-password" for="signup-password2">重複輸入密碼</label> <input class="full-width has-padding has-border" id="signup-password2" name="password2" type="password" placeholder="重複輸入密碼"> </p> <!-- <p class="fieldset"> <input type="checkbox" id="accept-terms"> <label for="accept-terms">我已閱讀並贊成 <a href="javascript:;">用戶協議</a></label> </p> --> <input type="hidden" name="action" value="signup"> <p class="fieldset"> <input class="full-width2" type="submit" value="註冊新用戶"> </p> <p class="fieldset"> <a href="//www.runoob.com/w3cnote/runoob-user-test-intro.html#invite" target="_blank">如何獲取邀請碼?</a> </p> <div class="err-msg"></div> </div> </div> <a href="javascript:;" class="cd-close-form">關閉</a> </div> </div> <script src="/wp-content/themes/runoob/assets/js/main.js?v=1.189"></script> <script src="//static.runoob.com/assets/libs/hl/run_prettify.js"></script> </body> </html>
HTTP/1.1 200 OK
解析:
協議類型:HTTP/1.1
狀態碼:200
Server: Tengine
Content-Type: text/html
Content-Length: 46318
Connection: keep-alive
Date: Mon, 01 Oct 2018 07:22:39 GMT
X-Powered-By: HHVM/3.28.1
Vary: Accept-Encoding
Via: cache43.l2st3-1[0,200-0,H], cache25.l2st3-1[2,0], kunlun7.cn257[0,200-0,H], kunlun6.cn257[0,0]
Age: 75638
Ali-Swift-Global-Savetime: 1538446306
X-Cache: HIT TCP_MEM_HIT dirn:1:11089010
X-Swift-SaveTime: Tue, 02 Oct 2018 02:11:46 GMT
X-Swift-CacheTime: 86400
Timing-Allow-Origin: *
EagleId: de551ac615384541979717849e
Fiddler軟件解析:
<!Doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta property="qc:admins" content="465267610762567726375" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>HTTP 教程 | 菜鳥教程</title> <link rel='dns-prefetch' href='//s.w.org' /> <link rel="canonical" href="http://www.runoob.com/http/http-tutorial.html" /> <meta name="keywords" content="HTTP 教程,HTTP"> <meta name="description" content="HTTP 教程 HTTP協議(HyperText Transfer Protocol,超文本傳輸協議)是因特網上應用最爲普遍的一種網絡傳輸協議,全部的WWW文件都必須遵照這個標準。 HTTP是一個基於TCP/IP通訊協議來傳遞數據(HTML 文件, 圖片文件, 查詢結果等)。 內容列表 HTTP 簡介 本章節介紹了HTTP協議。 HTTP 消息結構 本章節介紹了HTTP消息結構 HTTP 方法 本章節介紹了HTTP的方法,包括.."> <link rel="shortcut icon" href="//static.runoob.com/images/favicon.ico" mce_href="//static.runoob.com/images/favicon.ico" type="image/x-icon" > <link rel="stylesheet" href="/wp-content/themes/runoob/style.css?v=1.147" type="text/css" media="all" /> <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" media="all" /> <!--[if gte IE 9]><!--> <script src="//cdn.bootcss.com/jquery/2.0.3/jquery.min.js"></script> <!--<![endif]--> <!--[if lt IE 9]> <script src="//cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script> <script src="//cdn.bootcss.com/html5shiv/r29/html5.min.js"></script> <![endif]--> <link rel="apple-touch-icon" href="//static.runoob.com/images/icon/mobile-icon.png"/> <meta name="apple-mobile-web-app-title" content="菜鳥教程"> </head> <body> <!-- 頭部 --> <div class="container logo-search"> <div class="col search row-search-mobile"> <form action="index.php"> <input class="placeholder" placeholder="搜索……" name="s" autocomplete="off"> </form> </div> <div class="row"> <div class="col logo"> <h1><a href="/">菜鳥教程 -- 學的不只是技術,更是夢想!</a></h1> </div> <div class="col right-list"> <button class="btn btn-responsive-nav btn-inverse" data-toggle="collapse" data-target=".nav-main-collapse" id="pull" style=""> <i class="fa fa-navicon"></i> </button> </div> <div class="col search search-desktop last"> <form action="//www.runoob.com/" target="_blank"> <input class="placeholder" id="s" name="s" placeholder="搜索……" autocomplete="off"> </form> </div> </div> </div> <!-- 導航欄 --> <!-- 導航欄 --> <div class="container navigation"> <div class="row"> <div class="col nav"> <ul class="pc-nav"> <li><a href="//www.runoob.com/">首頁</a></li> <li><a href="/html/html-tutorial.html">HTML</a></li> <li><a href="/css/css-tutorial.html">CSS</a></li> <li><a href="/js/js-tutorial.html">JavaScript</a></li> <li><a href="/jquery/jquery-tutorial.html">jQuery</a></li> <li><a href="/bootstrap/bootstrap-tutorial.html">Bootstrap</a></li> <li><a href="/sql/sql-tutorial.html">SQL</a></li> <li><a href="/mysql/mysql-tutorial.html">MySQL</a></li> <li><a href="/php/php-tutorial.html">PHP</a></li> <li><a href="/python/python-tutorial.html">Python2</a></li> <li><a href="/python3/python3-tutorial.html">Python3</a></li> <li><a href="/cprogramming/c-tutorial.html">C</a></li> <li><a href="/cplusplus/cpp-tutorial.html">C++</a></li> <li><a href="/csharp/csharp-tutorial.html">C#</a></li> <li><a href="/java/java-tutorial.html">Java</a></li> <li><a href="/browser-history">本地書籤</a></li> <!-- <li><a href="javascript:;" class="runoob-pop">登陸</a></li> --> </ul> <ul class="mobile-nav"> <li><a href="//www.runoob.com/">首頁</a></li> <li><a href="/html/html-tutorial.html">HTML</a></li> <li><a href="/css/css-tutorial.html">CSS</a></li> <li><a href="/js/js-tutorial.html">JS</a></li> <li><a href="/browser-history">本地書籤</a></li> <a href="javascript:void(0)" class="search-reveal">Search</a> </ul> </div> </div> </div><!-- 內容 --> <div class="container main"> <!-- 中間 --> <div class="row"> <div class="col left-column"> <div class="tab">HTTP 教程 <a data-cate="50" href="javascript:void(0);" title="夜間模式" id="moon"><i class="fa fa-moon-o" aria-hidden="true" style="font-size: 1.4em;float: right;margin: 4px 6px 0;"></i></a> <a data-cate="50" style="display:none;" href="javascript:void(0);" title="日間模式" id="sun" ><i class="fa fa-sun-o" aria-hidden="true" style="font-size: 1.4em;float: right;margin: 4px 6px 0;"></i></a> </div> <div class="sidebar-box gallery-list"> <div class="design" id="leftcolumn"> <a target="_top" title="HTTP 教程" href="/http/http-tutorial.html" > HTTP 教程 </a> <a target="_top" title="HTTP 簡介" href="/http/http-intro.html" > HTTP 簡介 </a> <a target="_top" title="HTTP 消息結構" href="/http/http-messages.html" > HTTP 消息結構 </a> <a target="_top" title="HTTP請求方法" href="/http/http-methods.html" > HTTP請求方法 </a> <a target="_top" title="HTTP 響應頭信息" href="/http/http-header-fields.html" > HTTP 響應頭信息 </a> <a target="_top" title="HTTP狀態碼" href="/http/http-status-codes.html" > HTTP狀態碼 </a> <a target="_top" title="HTTP content-type" href="/http/http-content-type.html" > HTTP content-type </a> </div> </div> </div> <div class="col middle-column"> <div class="article"> <div class="article-heading-ad" style="display: none;"> </div> <div class="previous-next-links"> <div class="previous-design-link"><i style="font-size:16px;" class="fa fa-arrow-left" aria-hidden="true"></i> <a href="http://www.runoob.com/http/http-status-codes.html" rel="prev"> HTTP狀態碼</a> </div> <div class="next-design-link"><a href="http://www.runoob.com/http/http-content-type.html" rel="next"> HTTP content-type</a> <i style="font-size:16px;" class="fa fa-arrow-right" aria-hidden="true"></i></div> </div> <div class="article-body"> <div class="article-intro" id="content"> <h1>HTTP 教程</h1><hr> <div class="tutintro"> <p>HTTP協議(HyperText Transfer Protocol,超文本傳輸協議)是因特網上應用最爲普遍的一種網絡傳輸協議,全部的WWW文件都必須遵照這個標準。</p> <p>HTTP是一個基於TCP/IP通訊協議來傳遞數據(HTML 文件, 圖片文件, 查詢結果等)。</p> </div> <hr> <h3><span style="text-decoration: underline;">內容列表</span></h3> <p><a href="/http/http-intro.html">HTTP 簡介</a><br> 本章節介紹了HTTP協議。</p> <p><a href="/http/http-messages.html">HTTP 消息結構</a><br> 本章節介紹了HTTP消息結構</p> <p><a href="/http/http-methods.html">HTTP 方法</a><br> 本章節介紹了HTTP的方法,包括 GET, POST, HEAD 等。</p> <p><a href="/http/http-header-fields.html">HTTP 頭信息</a><br> 本章節介紹了HTTP的頭信息</p> <p><a href="/http/http-status-codes.html">HTTP 狀態碼</a><br> 本章節列出了全部HTTP的狀態碼。</p> </div> </div> <div class="previous-next-links"> <div class="previous-design-link"><i style="font-size:16px;" class="fa fa-arrow-left" aria-hidden="true"></i> <a href="http://www.runoob.com/http/http-status-codes.html" rel="prev"> HTTP狀態碼</a> </div> <div class="next-design-link"><a href="http://www.runoob.com/http/http-content-type.html" rel="next"> HTTP content-type</a> <i style="font-size:16px;" class="fa fa-arrow-right" aria-hidden="true"></i></div> </div> <!-- 筆記列表 --> <style> .wrapper { /*text-transform: uppercase; */ background: #ececec; color: #555; cursor: help; font-family: "Gill Sans", Impact, sans-serif; font-size: 20px; position: relative; text-align: center; width: 200px; -webkit-transform: translateZ(0); /* webkit flicker fix */ -webkit-font-smoothing: antialiased; /* webkit text rendering fix */ } .wrapper .tooltip { white-space: nowrap; font-size: 14px; text-align: left; background: #96b97d; bottom: 100%; color: #fff; display: block; left: -25px; margin-bottom: 15px; opacity: 0; padding: 14px; pointer-events: none; position: absolute; -webkit-transform: translateY(10px); -moz-transform: translateY(10px); -ms-transform: translateY(10px); -o-transform: translateY(10px); transform: translateY(10px); -webkit-transition: all .25s ease-out; -moz-transition: all .25s ease-out; -ms-transition: all .25s ease-out; -o-transition: all .25s ease-out; transition: all .25s ease-out; -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); -ms-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); -o-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28); } .tooltip a { color:#fff; } /* This bridges the gap so you can mouse into the tooltip without it disappearing */ .wrapper .tooltip:before { bottom: -20px; content: " "; display: block; height: 20px; left: 0; position: absolute; width: 100%; } /* CSS Triangles - see Trevor's post */ .wrapper .tooltip:after { border-left: solid transparent 10px; border-right: solid transparent 10px; border-top: solid #96b97d 10px; bottom: -10px; content: " "; height: 0; left: 20%; margin-left: -13px; position: absolute; width: 0; } .wrapper .tooltip1 { margin-left: 50px; padding-top: 0px; } .wrapper:hover .tooltip { opacity: 1; pointer-events: auto; -webkit-transform: translateY(0px); -moz-transform: translateY(0px); -ms-transform: translateY(0px); -o-transform: translateY(0px); transform: translateY(0px); } /* IE can just show/hide with no transition */ .lte8 .wrapper .tooltip { display: none; } .lte8 .wrapper:hover .tooltip { display: block; } </style> <div id="respond" class="no_webshot"> <div class="comment-signarea" style=" padding: 20px 20px;"> <h3 class="text-muted" id="share_code" style="color: #799961;"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 點我分享筆記</h3> <!-- <p style="font-size:14px;">筆記須要是本篇文章的內容擴展!</p><br> <p style="font-size:12px;"><a href="//www.runoob.com/tougao" target="_blank">文章投稿,可點擊這裏</a></p> <p style="font-size:14px;"><a href="/w3cnote/runoob-user-test-intro.html#invite" target="_blank">註冊邀請碼獲取方式</a></p> <h3 class="text-muted"><i class="fa fa-info-circle" aria-hidden="true"></i> 分享筆記前必須<a href="javascript:;" class="runoob-pop">登陸</a>!</h3> <p><a href="/w3cnote/runoob-user-test-intro.html#invite" target="_blank">註冊邀請碼獲取方式</a></p>--> </div> <form action="/wp-content/themes/runoob/option/addnote.php" method="post" id="commentform" style="display:none;"> <div class="comt"> <div class="comt-title"> <i style="font-size:36px;" class="fa fa-user-circle" aria-hidden="true"></i> <p><a id="cancel-comment-reply-link" href="javascript:;">取消</a></p> </div> <div class="comt-box"> <div id="mded"></div> <div class="comt-ctrl"> <div class="comt-tips"><input type='hidden' name='comment_post_ID' value='4108' id='comment_post_ID' /> <input type='hidden' name='comment_parent' id='comment_parent' value='0' /> </div> <button type="submit" name="submit" id="submit" tabindex="5"><i class="fa fa-pencil" aria-hidden="true"></i> 分享筆記</button> </div> </div> <div class="comt-comterinfo"> <ul id="comment-author-info"> <li class="form-inline"><label class="hide" for="author">暱稱</label><input class="ipt" type="text" name="author" id="author" value="" tabindex="2" placeholder="暱稱"><span class="text-muted">暱稱 (必填)</span></li> <li class="form-inline"><label class="hide" for="email">郵箱</label><input class="ipt" type="text" name="email" id="email" value="" tabindex="3" placeholder="郵箱"><span class="text-muted">郵箱 (必填)</span></li> <li class="form-inline"><label class="hide" for="url">引用地址</label><input class="ipt" type="text" name="url" id="url" value="" tabindex="4" placeholder="引用地址"><span class="text-muted">引用地址</span></li> </ul> </div> </div> </form> </div> <script type="text/javascript"> $(function() { //初始化編輯器 var editor = new Simditor({ textarea: $('#mded'), placeholder: '寫筆記...', upload:false, // upload: {url:'/api/comment_upload_file.php',params: null,fileKey: 'upload_file',connectionCount: 1,leaveConfirm: '文件正在上傳,您肯定離開?'}, defaultImage: 'http://www.runoob.com/images/logo.png', codeLanguages: '', toolbar: [ 'bold','code','ul','ol','image' ] }); editor.on('selectionchanged', function() { $(".code-popover").hide(); }); // 提交數據 $("#share_code").click(function() { $(".comment-signarea").hide(); $("#commentform").show(); }); $("#user_add_note").click(function() { $(".comment-signarea").hide(); $("#commentform").show(); $('html, body').animate({ scrollTop: $("#respond").offset().top }, 200); }); // 提交筆記 var commentform=$('#commentform'); commentform.prepend('<div id="comment-status" style="display:none;" ></div>'); var statusdiv=$('#comment-status'); commentform.submit(function(e){ e.preventDefault(); var noteContent = editor.getValue(); // console.log(noteContent); noteContent = noteContent.replace(/<pre><code>/g,"<pre>"); noteContent = noteContent.replace(/<\/code><\/pre>/g,"</pre>"); // 系列化表單數據 var comment_parent = 0; var is_user_logged_in = $("#is_user_logged_in").val(); var comment_post_ID = 4108; var _wp_unfiltered_html_comment = $("#_wp_unfiltered_html_comment").val(); var comment = noteContent; var author = $("#author").val(); var url = $("#url").val(); var email = $("#email").val(); if(isBlank(author) && is_user_logged_in==0) { statusdiv.html('<p class="ajax-error">請輸入暱稱!</p>').show(); } else if(isBlank(email) && is_user_logged_in==0) { statusdiv.html('<p class="ajax-error">請輸入郵箱!</p>').show(); } else { // var formdata=commentform.serialize() + "&comment=" + noteContent ; // 添加狀態信息 statusdiv.html('<p>Processing...</p>').show(); // 獲取表單提交地址 var formurl=commentform.attr('action'); // 異步提交 $.ajax({ type: 'post', url: formurl, dataType:'json', data: {"comment_parent":comment_parent,"comment_post_ID":comment_post_ID, "_wp_unfiltered_html_comment":_wp_unfiltered_html_comment,"comment":comment,"url":url, "email":email,"author":author}, error: function(XMLHttpRequest, textStatus, errorThrown){ statusdiv.html('<p class="ajax-error" >數據不完整或表單提交太快了!</p>').show(); }, success: function(data, textStatus){ if(data.errorno=="0") { $("#submit").prop('disabled', true); statusdiv.html('<p class="ajax-success" >筆記已提交審覈,感謝分享筆記!</p>').show(); alert('筆記已提交審覈,感謝分享筆記!'); }else{ statusdiv.html('<p class="ajax-error" >'+data.msg+'</p>').show(); } commentform.find('textarea[name=comment]').val(''); } }); setTimeout(function(){ $("#submit").prop('disabled', false); }, 10*1000); } return false; }); }); function isBlank(str) { return (!str || /^\s*$/.test(str)); } </script> <link rel="stylesheet" href="/wp-content/themes/runoob/assets/css/qa.css?1.42"> <link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/simditor/2.3.6/styles/simditor.min.css" /> <script type="text/javascript" src="//static.runoob.com/assets/simditor/2.3.6/scripts/module.js"></script> <script type="text/javascript" src="//static.runoob.com/assets/simditor/2.3.6/scripts/hotkeys.js"></script> <script type="text/javascript" src="//static.runoob.com/assets/simditor/2.3.6/scripts/uploader.js"></script> <script type="text/javascript" src="//cdn.bootcss.com/simditor/2.3.6/lib/simditor.min.js"></script> <div class="sidebar-box ad-box ad-box-large"> <div id="ad-336280" class="ad-336280"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- 移動版 自動調整 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5751451760833794" data-ad-slot="1691338467" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> </div> <!-- 右邊欄 --> <div class="fivecol last right-column"> <!-- <div class="tab tab-light-blue" style="text-align: center;">關注微信</div> <div class="sidebar-box"> <a href="http://m.runoob.com/" target="_blank"> <img src="http://www.runoob.com/wp-content/themes/w3cschool.cc/assets/img/qrcode.jpg" alt="移動版"> </a> <div class="qqinfo"> <a target="_blank" href="http://jq.qq.com/?_wv=1027&k=dOwwKN" id="qqhref"> <img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="菜鳥家族" title="菜鳥家族"></a> <span>(羣號:<span id="qqid">365967760</span>)</span> </div> </div> --> <style> .sidebar-tree .double-li { width:300px; } .sidebar-tree .double-li li { width: 44%; line-height: 1.5em; border-bottom: 1px solid #ccc; float: left; display: inline; } </style> <div class="sidebar-box ad-box ad-box-large"> <div class="sidebar-box advertise-here" style="margin: 0 auto;"> <a href="javascript:void(0);" style="font-size: 16px; color:#64854c;font-weight:bold;"> <i class="fa fa-list" aria-hidden="true"></i> 分類導航</a> </div> <div class="sidebar-box sidebar-cate"> <div class="sidebar-tree" > <ul><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> HTML / CSS</a><ul class="double-li"><li><a title="HTML 教程" href="//www.runoob.com/html/html-tutorial.html">HTML 教程</a></li><li><a title="HTML5 教程" href="//www.runoob.com/html/html5-intro.html">HTML5 教程</a></li><li><a title="CSS 教程" href="//www.runoob.com/css/css-tutorial.html">CSS 教程</a></li><li><a title="CSS3 教程" href="//www.runoob.com/css3/css3-tutorial.html">CSS3 教程</a></li><li><a title="Bootstrap3 教程" href="//www.runoob.com/bootstrap/bootstrap-tutorial.html">Bootstrap3 教程</a></li><li><a title="Bootstrap4 教程" href="//www.runoob.com/bootstrap4/bootstrap4-tutorial.html">Bootstrap4 教程</a></li><li><a title="Font Awesome 教程" href="//www.runoob.com/font-awesome/fontawesome-tutorial.html">Font Awesome 教程</a></li><li><a title="Foundation 教程" href="//www.runoob.com/foundation/foundation-tutorial.html">Foundation 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> JavaScript</a><ul class="double-li"><li><a title="JavaScript 教程" href="//www.runoob.com/js/js-tutorial.html">JavaScript 教程</a></li><li><a title="HTML DOM 教程" href="//www.runoob.com/htmldom/htmldom-tutorial.html">HTML DOM 教程</a></li><li><a title="jQuery 教程" href="//www.runoob.com/jquery/jquery-tutorial.html">jQuery 教程</a></li><li><a title="AngularJS 教程" href="//www.runoob.com/angularjs/angularjs-tutorial.html">AngularJS 教程</a></li><li><a title="AngularJS2 教程" href="//www.runoob.com/angularjs2/angularjs2-tutorial.html">AngularJS2 教程</a></li><li><a title="Vue.js 教程" href="//www.runoob.com/vue2/vue-tutorial.html">Vue.js 教程</a></li><li><a title="React 教程" href="//www.runoob.com/react/react-tutorial.html">React 教程</a></li><li><a title="jQuery UI 教程" href="//www.runoob.com/jqueryui/jqueryui-tutorial.html">jQuery UI 教程</a></li><li><a title="jQuery EasyUI 教程" href="//www.runoob.com/jeasyui/jqueryeasyui-tutorial.html">jQuery EasyUI 教程</a></li><li><a title="Node.js 教程" href="//www.runoob.com/nodejs/nodejs-tutorial.html">Node.js 教程</a></li><li><a title="AJAX 教程" href="//www.runoob.com/ajax/ajax-tutorial.html">AJAX 教程</a></li><li><a title="JSON 教程" href="//www.runoob.com/json/json-tutorial.html">JSON 教程</a></li><li><a title="Highcharts 教程" href="//www.runoob.com/highcharts/highcharts-tutorial.html">Highcharts 教程</a></li><li><a title="Google 地圖 教程" href="//www.runoob.com/googleapi/google-maps-basic.html">Google 地圖 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 服務端</a><ul class="double-li"><li><a title="PHP 教程" href="//www.runoob.com/php/php-tutorial.html">PHP 教程</a></li><li><a title="Python 教程" href="//www.runoob.com/python/python-tutorial.html">Python 教程</a></li><li><a title="Python3 教程" href="//www.runoob.com/python3/python3-tutorial.html">Python3 教程</a></li><li><a title="Django 教程" href="//www.runoob.com/django/django-tutorial.html">Django 教程</a></li><li><a title="Linux 教程" href="//www.runoob.com/linux/linux-tutorial.html">Linux 教程</a></li><li><a title="Docker 教程" href="//www.runoob.com/docker/docker-tutorial.html">Docker 教程</a></li><li><a title="Ruby 教程" href="//www.runoob.com/ruby/ruby-tutorial.html">Ruby 教程</a></li><li><a title="Java 教程" href="//www.runoob.com/java/java-tutorial.html">Java 教程</a></li><li><a title="C 教程" href="//www.runoob.com/c/c-tutorial.html">C 教程</a></li><li><a title="C++ 教程" href="//www.runoob.com/cplusplus/cpp-tutorial.html">C++ 教程</a></li><li><a title="Perl 教程" href="//www.runoob.com/perl/perl-tutorial.html">Perl 教程</a></li><li><a title="Servlet 教程" href="//www.runoob.com/servlet/servlet-tutorial.html">Servlet 教程</a></li><li><a title="JSP 教程" href="//www.runoob.com/jsp/jsp-tutorial.html">JSP 教程</a></li><li><a title="Lua 教程" href="//www.runoob.com/lua/lua-tutorial.html">Lua 教程</a></li><li><a title="Scala 教程" href="//www.runoob.com/scala/scala-tutorial.html">Scala 教程</a></li><li><a title="Go 教程" href="//www.runoob.com/go/go-tutorial.html">Go 教程</a></li><li><a title="設計模式" href="//www.runoob.com/design-pattern/design-pattern-tutorial.html">設計模式</a></li><li><a title="正則表達式" href="//www.runoob.com/regexp/regexp-tutorial.html">正則表達式</a></li><li><a title="Maven 教程" href="//www.runoob.com/maven/maven-tutorial.html">Maven 教程</a></li><li><a title="ASP 教程" href="//www.runoob.com/asp/asp-tutorial.html">ASP 教程</a></li><li><a title="AppML 教程" href="//www.runoob.com/appml/appml-tutorial.html">AppML 教程</a></li><li><a title="VBScript 教程" href="//www.runoob.com/vbscript/vbscript-tutorial.html">VBScript 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 數據庫</a><ul class="double-li"><li><a title="SQL 教程" href="//www.runoob.com/sql/sql-tutorial.html">SQL 教程</a></li><li><a title="Mysql 教程" href="//www.runoob.com/mysql/mysql-tutorial.html">Mysql 教程</a></li><li><a title="SQLite 教程" href="//www.runoob.com/sqlite/sqlite-tutorial.html">SQLite 教程</a></li><li><a title="MongoDB 教程" href="//www.runoob.com/mongodb/mongodb-tutorial.html">MongoDB 教程</a></li><li><a title="Redis 教程" href="//www.runoob.com/redis/redis-tutorial.html">Redis 教程</a></li><li><a title="Memcached 教程" href="//www.runoob.com/Memcached/Memcached-tutorial.html">Memcached 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 移動端</a><ul class="double-li"><li><a title="Android 教程" href="//www.runoob.com/w3cnote/android-tutorial-intro.html">Android 教程</a></li><li><a title="Swift 教程" href="//www.runoob.com/swift/swift-tutorial.html">Swift 教程</a></li><li><a title="jQuery Mobile 教程" href="//www.runoob.com/jquerymobile/jquerymobile-tutorial.html">jQuery Mobile 教程</a></li><li><a title="ionic 教程" href="//www.runoob.com/ionic/ionic-tutorial.html">ionic 教程</a></li><li><a title="Kotlin 教程" href="//www.runoob.com/kotlin/kotlin-tutorial.html">Kotlin 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> XML 教程</a><ul class="double-li"><li><a title="XML 教程" href="//www.runoob.com/xml/xml-tutorial.html">XML 教程</a></li><li><a title="DTD 教程" href="//www.runoob.com/dtd/dtd-tutorial.html">DTD 教程</a></li><li><a title="XML DOM 教程" href="//www.runoob.com/dom/dom-tutorial.html">XML DOM 教程</a></li><li><a title="XSLT 教程" href="//www.runoob.com/xsl/xsl-tutorial.html">XSLT 教程</a></li><li><a title="XPath 教程" href="//www.runoob.com/xpath/xpath-tutorial.html">XPath 教程</a></li><li><a title="XQuery 教程" href="//www.runoob.com/xquery/xquery-tutorial.html">XQuery 教程</a></li><li><a title="XLink 教程" href="//www.runoob.com/xlink/xlink-tutorial.html">XLink 教程</a></li><li><a title="XPointer 教程" href="//www.runoob.com/xlink/xlink-tutorial.html">XPointer 教程</a></li><li><a title="XML Schema 教程" href="//www.runoob.com/schema/schema-tutorial.html">XML Schema 教程</a></li><li><a title="XSL-FO 教程" href="//www.runoob.com/xslfo/xslfo-tutorial.html">XSL-FO 教程</a></li><li><a title="SVG 教程" href="//www.runoob.com/svg/svg-tutorial.html">SVG 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> ASP.NET</a><ul class="double-li"><li><a title="ASP.NET 教程" href="//www.runoob.com/aspnet/aspnet-tutorial.html">ASP.NET 教程</a></li><li><a title="C# 教程" href="//www.runoob.com/csharp/csharp-tutorial.html">C# 教程</a></li><li><a title="Web Pages 教程" href="//www.runoob.com/aspnet/webpages-intro.html">Web Pages 教程</a></li><li><a title="Razor 教程" href="//www.runoob.com/aspnet/razor-intro.html">Razor 教程</a></li><li><a title="MVC 教程" href="//www.runoob.com/aspnet/mvc-intro.html">MVC 教程</a></li><li><a title="Web Forms 教程" href="//www.runoob.com/aspnet/aspnet-intro.html">Web Forms 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> Web Service</a><ul class="double-li"><li><a title="Web Service 教程" href="//www.runoob.com/webservices/webservices-tutorial.html">Web Service 教程</a></li><li><a title="WSDL 教程" href="//www.runoob.com/wsdl/wsdl-tutorial.html">WSDL 教程</a></li><li><a title="SOAP 教程" href="//www.runoob.com/soap/soap-tutorial.html">SOAP 教程</a></li><li><a title="RSS 教程" href="//www.runoob.com/rss/rss-tutorial.html">RSS 教程</a></li><li><a title="RDF 教程" href="//www.runoob.com/rdf/rdf-tutorial.html">RDF 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 開發工具</a><ul class="double-li"><li><a title="Eclipse 教程" href="//www.runoob.com/eclipse/eclipse-tutorial.html">Eclipse 教程</a></li><li><a title="Git 教程" href="//www.runoob.com/git/git-tutorial.html">Git 教程</a></li><li><a title="Svn 教程" href="//www.runoob.com/svn/svn-tutorial.html">Svn 教程</a></li><li><a title="Firebug 教程" href="//www.runoob.com/firebug/firebug-tutorial.html">Firebug 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 網站建設</a><ul class="double-li"><li><a title="HTTP 教程" href="//www.runoob.com/http/http-tutorial.html">HTTP 教程</a></li><li><a title="網站建設指南" href="//www.runoob.com/web/web-buildingprimer.html">網站建設指南</a></li><li><a title="瀏覽器信息" href="//www.runoob.com/browsers/browser-information.html">瀏覽器信息</a></li><li><a title="網站主機教程" href="//www.runoob.com/hosting/hosting-tutorial.html">網站主機教程</a></li><li><a title="TCP/IP 教程" href="//www.runoob.com/tcpip/tcpip-tutorial.html">TCP/IP 教程</a></li><li><a title="W3C 教程" href="//www.runoob.com/w3c/w3c-tutorial.html">W3C 教程</a></li><li><a title="網站品質" href="//www.runoob.com/quality/quality-tutorial.html">網站品質</a></li></ul></li></ul> </div> </div> </div> <br> <div class="sidebar-box ad-box ad-box-large"> <div class="sidebar-box advertise-here"> <a href="javascript:void(0);">Advertisement</a> </div> <div class="ad-600160" id="sidebar-right-ads"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- 側欄1 --> <ins class="adsbygoogle" style="display:inline-block;width:160px;height:600px" data-ad-client="ca-pub-5751451760833794" data-ad-slot="4106274865"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div></div> </div> <script> var aid = 4108; function coll() { $.post( '/wp-content/themes/runoob/option/user/userinfo.php', {aid:aid, action:"collarticle", opt:'add'},function( data ) { if(data.error==0) { $("#content").find("h1:first").find("a").attr("href","javascript:void(0);"); $("#content").find("h1:first").find("img").attr("src","http://www.runoob.com/wp-content/themes/runoob/assets/img/coll2.png").css({width:32+"px",height:32+"px"}); } alert(data.msg); },'json'); } </script> <!-- 反饋對話框開始 --> <script src="/wp-content/themes/runoob/assets/feedback/stable/2.0/feedback.js?1.0"></script> <link rel="stylesheet" href="/wp-content/themes/runoob/assets/feedback/stable/2.0/feedback.css?1.0" /> <script type="text/javascript"> $.feedback({ ajaxURL: '/feedback/runoob_feedback.php', html2canvasURL: '/wp-content/themes/runoob/assets/feedback/stable/2.0/html2canvas.js' }); </script> <!-- 反饋對話框結束 --> <button class="feedback-btn feedback-btn-gray">反饋/建議</button> <!-- 底部 --> <div id="footer" class="mar-t50"> <div class="runoob-block"> <div class="runoob cf"> <dl> <dt> 在線實例 </dt> <dd> ·<a target="_blank" href="/html/html-examples.html">HTML 實例</a> </dd> <dd> ·<a target="_blank" href="/css/css-examples.html">CSS 實例</a> </dd> <dd> ·<a target="_blank" href="/js/js-examples.html">JavaScript 實例</a> </dd> <dd> ·<a target="_blank" href="/ajx/ajax-examples.html">Ajax 實例</a> </dd> <dd> ·<a target="_blank" href="/jquery/jquery-examples.html">jQuery 實例</a> </dd> <dd> ·<a target="_blank" href="/xml/xml-examples.html">XML 實例</a> </dd> <dd> ·<a target="_blank" href="/java/java-examples.html">Java 實例</a> </dd> </dl> <dl> <dt> 字符集&工具 </dt> <dd> · <a target="_blank" href="/charsets/html-charsets.html">HTML 字符集設置</a> </dd> <dd> · <a target="_blank" href="/tags/html-ascii.html">HTML ASCII 字符集</a> </dd> <dd> · <a target="_blank" href="/tags/ref-entities.html">HTML ISO-8859-1</a> </dd> <dd> · <a target="_blank" href="/tags/html-symbols.html">HTML 實體符號</a> </dd> <dd> · <a target="_blank" href="/tags/html-colorpicker.html">HTML 拾色器</a> </dd> <dd> · <a target="_blank" href="//c.runoob.com/front-end/53">JSON 格式化工具</a> </dd> </dl> <dl> <dt> 最新更新 </dt> <dd> · <a href="http://www.runoob.com/w3cnote/php-phpmailer.html" title="PHP 使用 phpmailer 發送電子郵件">PHP 使用 phpmai...</a> </dd> <dd> · <a href="http://www.runoob.com/w3cnote/warning-this-program-uses-gets-which-is-unsafe.html" title="C 中使用 gets() 提示 warning: this program uses gets(), which is unsafe.">C 中使用 gets()...</a> </dd> <dd> · <a href="http://www.runoob.com/python3/python3-func-input.html" title="Python3 input() 函數">Python3 input()...</a> </dd> <dd> · <a href="http://www.runoob.com/w3cnote/summary-of-network.html" title="計算機網絡基礎知識總結">計算機網絡基礎...</a> </dd> <dd> · <a href="http://www.runoob.com/vue2/vue-examples.html" title="Vue.js 實例">Vue.js 實例</a> </dd> <dd> · <a href="http://www.runoob.com/python3/ref-set-update.html" title="Python Set update() 方法">Python Set upda...</a> </dd> <dd> · <a href="http://www.runoob.com/python3/ref-set-union.html" title="Python Set union() 方法">Python Set unio...</a> </dd> </dl> <dl> <dt> 站點信息 </dt> <dd> · <a target="_blank" href="//mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=ssbDyoOAgfLU3crf09venNHd3w" rel="external nofollow">意見反饋</a> <!--<a class="wxpopup" onclick="popFunction()">合做聯繫 <span class="popuptext" id="myPopup">微信:<strong>centos5</strong></span> </a>--> </dd> <dd> · <a target="_blank" href="/disclaimer">免責聲明</a> </dd> <!-- <dd style="display: block;"> · <a href="javascript:void(0)" onclick="dashangToggle()" style="font-weight:bold;color:#f00;" title="打賞,支持一下">打賞一下</a> </dd> --> <dd> · <a target="_blank" href="/aboutus">關於咱們</a> </dd> <dd> · <a target="_blank" href="/archives">文章歸檔</a> </dd> <!-- <dd> · <a href="https://www.xiaoyouxi100.com/?from=runoob" onclick="_hmt.push(['_trackEvent', '小遊戲', 'click', 'xiaoyouxi100']);" target="_blank" title="小遊戲">小遊戲</a> </dd> --> </dl> <div class="search-share"> <div class="app-download"> <div> <strong>關注微信</strong> </div> </div> <div class="share"> <img width="128" height="128" src="/wp-content/themes/runoob/assets/images/qrcode.png" /> </div> </div> </div> </div> <div class="w-1000 copyright"> Copyright © 2013-2018 <strong><a href="//www.runoob.com/" target="_blank">菜鳥教程</a></strong> <strong><a href="//www.runoob.com/" target="_blank">runoob.com</a></strong> All Rights Reserved. 備案號:閩ICP備15012807號-1 </div> </div> <div class="fixed-btn"> <a class="go-top" href="javascript:void(0)" title="返回頂部"> <i class="fa fa-angle-up"></i></a> <a class="qrcode" href="javascript:void(0)" title="關注咱們"><i class="fa fa-qrcode"></i></a> <a class="writer" style="display:none" href="javascript:void(0)" title="標記/收藏"><i class="fa fa-star" aria-hidden="true"></i></a> <!-- qrcode modal --> <div id="bottom-qrcode" class="modal panel-modal hide fade in"> <h4>微信關注</h4> <div class="panel-body"><img alt="微信關注" width="128" height="128" src="/wp-content/themes/runoob/assets/images/qrcode.png"></div> </div> </div> <div class="hide_box"></div> <div class="shang_box"> <a class="shang_close" href="javascript:void(0)" onclick="dashangToggle()" title="關閉"><img src="//static.runoob.com/images/dashang/close.jpg" alt="取消" /></a> <div class="shang_tit"> <p>感謝您的支持,我會繼續努力的!</p> </div> <div class="shang_payimg"> <img src="//static.runoob.com/images/dashang/weipayimg.png" alt="掃碼支持" title="掃一掃" /> </div> <div class="pay_explain">掃碼打賞,你說多少就多少</div> <div class="shang_payselect"> <div class="pay_item checked" data-id="weipay"> <span class="radiobox"></span> <span class="pay_logo"><img src="//static.runoob.com/images/dashang/wechat.jpg" alt="微信" /></span> </div> <div class="pay_item" data-id="alipay"> <span class="radiobox"></span> <span class="pay_logo"><img src="//static.runoob.com/images/dashang/alipay.jpg" alt="支付寶" /></span> </div> </div> <div class="shang_info"> <p>打開<span id="shang_pay_txt">支付寶</span>掃一掃,便可進行掃碼打賞哦</p> <p><a href="//c.runoob.com/codedemo/5348" target="_blank"><span style=" font-size: 14px;color: #000;font-weight: bold;">點我查看本站打賞源碼!</span></a></p> </div> </div> <div id="testClick"></div> <div style="display:none;"> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?3eec0b7da6548cf07db3bc477ea905ee"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-84264393-2"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-84264393-2'); </script> </div> <script> window.jsui={ www: '//wwww.runoob.com', uri: '//www.runoob.com/wp-content/themes/runoob' }; </script> <style> ol,ul{list-style:none}.cd-switcher a{text-decoration:none;outline:0}.cd-switcher a:hover{text-decoration:underline}a:focus{outline:0;-moz-outline:0}.main_nav{width:300px;height:60px;margin:60px auto 10px auto}.main_nav li{float:left;width:60px;margin-right:10px;font-size:16px;padding:.6em 1em;border-radius:3em;background:#2f889a;text-align:center}.main_nav li a{color:#fff}.errtip{background-color:#fceaea;color:#db5353;padding:8px 15px;font-size:14px;border:1px solid #fc9797;border-radius:5px}.cd-user-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(52,54,66,0.9);z-index:3;overflow-y:auto;cursor:pointer;visibility:hidden;opacity:0;-webkit-transition:opacity .3s 0,visibility 0 .3s;-moz-transition:opacity .3s 0,visibility 0 .3s;transition:opacity .3s 0,visibility 0 .3s}.cd-user-modal.is-visible{visibility:visible;opacity:1;-webkit-transition:opacity .3s 0,visibility 0 0;-moz-transition:opacity .3s 0,visibility 0 0;transition:opacity .3s 0,visibility 0 0}.cd-user-modal.is-visible .cd-user-modal-container{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}.cd-user-modal-container{position:relative;width:90%;max-width:500px;background:#FFF;margin:3em auto 4em;cursor:auto;border-radius:.25em;-webkit-transform:translateY(-30px);-moz-transform:translateY(-30px);-ms-transform:translateY(-30px);-o-transform:translateY(-30px);transform:translateY(-30px);-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;transition-property:transform;-webkit-transition-duration:.3s;-moz-transition-duration:.3s;transition-duration:.3s}.cd-user-modal-container .cd-switcher:after{content:"";display:table;clear:both}.cd-user-modal-container .cd-switcher li{width:50%;float:left;text-align:center}.cd-user-modal-container .cd-switcher li:first-child a{border-radius:.25em 0 0 0}.cd-user-modal-container .cd-switcher li:last-child a{border-radius:0 .25em 0 0}.cd-user-modal-container .cd-switcher a{font-size:1.2em;font-weight:bold;display:block;width:100%;height:50px;line-height:50px;background:#e8f1e2;color:#96b880}.cd-user-modal-container .cd-switcher a.selected{background:#FFF;color:#505260}@media only screen and (min-width:600px){.cd-user-modal-container{margin:4em auto}.cd-user-modal-container .cd-switcher a{height:70px;line-height:70px}}.cd-form{padding:1.4em}.cd-form .fieldset{position:relative;margin:1.4em 0}.cd-form .fieldset:first-child{margin-top:0}.cd-form .fieldset:last-child{margin-bottom:0}.cd-form label{font-size:16px;font-size:.875rem}.cd-form label.image-replace{display:inline-block;position:absolute;left:15px;top:50%;bottom:auto;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);height:20px;width:20px;overflow:hidden;text-indent:100%;white-space:nowrap;color:transparent;text-shadow:none;background-repeat:no-repeat;background-position:50% 0}.cd-form label.cd-username{background-image:url("/wp-content/themes/runoob/assets/img/cd-icon-username.svg")}.cd-form label.cd-email{background-image:url("/wp-content/themes/runoob/assets/img/cd-icon-email.svg")}.cd-form label.cd-password{background-image:url("/wp-content/themes/runoob/assets/img/cd-icon-password.svg")}.cd-form input{margin:0;padding:0;border-radius:.25em}.cd-form input.full-width{width:80%}.cd-form input.full-width2{width:94%}.cd-form input.has-padding{padding:12px 20px 12px 50px}.cd-form input.has-border{border:1px solid #d2d8d8;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none}.cd-form input.has-border:focus{border-color:#98b880;box-shadow:0 0 5px rgba(52,54,66,0.1);outline:0}.cd-form input.has-error{border:1px solid #d76666}.cd-form input[type=password]{padding-right:65px}.cd-form input[type=submit]{padding:16px 0;cursor:pointer;background:#96b97d;color:#FFF;font-weight:bold;border:0;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none;font-size:1.2em;font-weight:bold}.no-touch .cd-form input[type=submit]:hover,.no-touch .cd-form input[type=submit]:focus{background:#3599ae;outline:0}@media only screen and (min-width:600px){.cd-form{padding:2em}.cd-form .fieldset{margin:2em 0}.cd-form .fieldset:first-child{margin-top:0}.cd-form .fieldset:last-child{margin-bottom:0}.cd-form input.has-padding{padding:16px 20px 16px 50px}.cd-form input[type=submit]{padding:16px 0}}.cd-close-form{display:block;position:absolute;width:40px;height:40px;right:0;top:-40px;background:url("/wp-content/themes/runoob/assets/img/cd-icon-close.svg") no-repeat center center;text-indent:100%;white-space:nowrap;overflow:hidden}@media only screen and (min-width:1170px){}#cd-login,#cd-signup,#cd-reset-password{display:none}#cd-login.is-selected,#cd-signup.is-selected,#cd-reset-password.is-selected{display:block} </style> <div class="cd-user-modal"> <div class="cd-user-modal-container"> <ul class="cd-switcher"> <li><a href="javascript:;">用戶登陸</a></li> <li><a href="javascript:;">註冊新用戶</a></li> </ul> <div id="cd-login"> <!-- 登陸表單 --> <div class="cd-form"> <p class="fieldset"> <label class="image-replace cd-username" for="signin-username">用戶名</label> <input class="full-width has-padding has-border" id="signin-username" name=username type="text" placeholder="輸入用戶名"> </p> <p class="fieldset"> <label class="image-replace cd-password" for="signin-password">密碼</label> <input class="full-width has-padding has-border" id="signin-password" name="password" type="password" placeholder="輸入密碼"> </p> <p class="fieldset"> <input type="checkbox" id="remember-me" checked> <label for="remember-me">記住登陸狀態</label> <a href="//www.runoob.com/reset-password" style="float: right;padding-right: 20px;" target="_blank">忘記密碼?</a> </p> <input type="hidden" name="action" value="signin"> <p class="fieldset"> <input class="full-width2" type="submit" value="登 錄"> </p> <div class="err-msg"></div> </div> </div> <div id="cd-signup"> <!-- 註冊表單 --> <div class="cd-form"> <p class="fieldset"> <label class="image-replace cd-password" for="verifycode">邀請碼</label> <input class="full-width has-padding has-border" id="signup-verifycode" name="verifycode" type="text" placeholder="輸入邀請碼"> </p> <p class="fieldset"> <label class="image-replace cd-username" for="signup-username">用戶名</label> <input class="full-width has-padding has-border" id="signup-username" name="name" type="text" placeholder="輸入用戶名"> </p> <p class="fieldset"> <label class="image-replace cd-email" for="signup-email">郵箱</label> <input class="full-width has-padding has-border" name="email" id="signup-email" type="email" placeholder="輸入mail"> </p> <p class="fieldset"> <label class="image-replace cd-password" for="signup-password">密碼</label> <input class="full-width has-padding has-border" id="signup-password" name="password" type="password" placeholder="輸入密碼"> </p> <p class="fieldset"> <label class="image-replace cd-password" for="signup-password2">重複輸入密碼</label> <input class="full-width has-padding has-border" id="signup-password2" name="password2" type="password" placeholder="重複輸入密碼"> </p> <!-- <p class="fieldset"> <input type="checkbox" id="accept-terms"> <label for="accept-terms">我已閱讀並贊成 <a href="javascript:;">用戶協議</a></label> </p> --> <input type="hidden" name="action" value="signup"> <p class="fieldset"> <input class="full-width2" type="submit" value="註冊新用戶"> </p> <p class="fieldset"> <a href="//www.runoob.com/w3cnote/runoob-user-test-intro.html#invite" target="_blank">如何獲取邀請碼?</a> </p> <div class="err-msg"></div> </div> </div> <a href="javascript:;" class="cd-close-form">關閉</a> </div> </div> <script src="/wp-content/themes/runoob/assets/js/main.js?v=1.189"></script> <script src="//static.runoob.com/assets/libs/hl/run_prettify.js"></script> </body> </html>
響應體爲HTML格式的文本文件。
根據HTTP標準,HTTP請求可使用多種請求方法。
HTTP1.0定義了三種請求方法: GET, POST 和 HEAD方法。
HTTP1.1新增了五種請求方法:OPTIONS, PUT, DELETE, TRACE ,CONNECT 和PATCH方法。
序號 | 方法 | 描述 |
---|---|---|
1 | GET | 請求指定的頁面信息,並返回實體主體。 |
2 | HEAD | 相似於get請求,只不過返回的響應中沒有具體的內容,用於獲取報頭 |
3 | POST | 向指定資源提交數據進行處理請求(例如提交表單或者上傳文件)。數據被包含在請求體中。POST請求可能會致使新的資源的創建和/或已有資源的修改。 |
4 | PUT | 從客戶端向服務器傳送的數據取代指定的文檔的內容。 |
5 | DELETE | 請求服務器刪除指定的頁面。 |
6 | CONNECT | HTTP/1.1協議中預留給可以將鏈接改成管道方式的代理服務器。 |
7 | OPTIONS | 容許客戶端查看服務器的性能。 |
8 | TRACE | 回顯服務器收到的請求,主要用於測試或診斷。 |
9 | PATCH | 用於對資源進行部分修改。 |
參考連接:
HTTP請求頭提供了關於請求,響應或者其餘的發送實體的信息。
在本章節中咱們將具體來介紹HTTP響應頭信息。
應答頭 | 說明 |
---|---|
Allow | 服務器支持哪些請求方法(如GET、POST等)。 |
Content-Encoding | 文檔的編碼(Encode)方法。只有在解碼以後才能夠獲得Content-Type頭指定的內容類型。利用gzip壓縮文檔可以顯著地減小HTML文檔的下載時間。Java的GZIPOutputStream能夠很方便地進行gzip壓縮,但只有Unix上的Netscape和Windows上的IE 四、IE 5才支持它。所以,Servlet應該經過查看Accept-Encoding頭(即request.getHeader("Accept-Encoding"))檢查瀏覽器是否支持gzip,爲支持gzip的瀏覽器返回經gzip壓縮的HTML頁面,爲其餘瀏覽器返回普通頁面。 |
Content-Length | 表示內容長度。只有當瀏覽器使用持久HTTP鏈接時才須要這個數據。若是你想要利用持久鏈接的優點,能夠把輸出文檔寫入 ByteArrayOutputStream,完成後查看其大小,而後把該值放入Content-Length頭,最後經過byteArrayStream.writeTo(response.getOutputStream()發送內容。 |
Content-Type | 表示後面的文檔屬於什麼MIME類型。Servlet默認爲text/plain,但一般須要顯式地指定爲text/html。因爲常常要設置Content-Type,所以HttpServletResponse提供了一個專用的方法setContentType。 |
Date | 當前的GMT時間。你能夠用setDateHeader來設置這個頭以免轉換時間格式的麻煩。 |
Expires | 應該在何時認爲文檔已通過期,從而再也不緩存它? |
Last-Modified | 文檔的最後改動時間。客戶能夠經過If-Modified-Since請求頭提供一個日期,該請求將被視爲一個條件GET,只有改動時間遲於指定時間的文檔纔會返回,不然返回一個304(Not Modified)狀態。Last-Modified也可用setDateHeader方法來設置。 |
Location | 表示客戶應當到哪裏去提取文檔。Location一般不是直接設置的,而是經過HttpServletResponse的sendRedirect方法,該方法同時設置狀態代碼爲302。 |
Refresh | 表示瀏覽器應該在多少時間以後刷新文檔,以秒計。除了刷新當前文檔以外,你還能夠經過setHeader("Refresh", "5; URL=http://host/path")讓瀏覽器讀取指定的頁面。 |
Server | 服務器名字。Servlet通常不設置這個值,而是由Web服務器本身設置。 |
Set-Cookie | 設置和頁面關聯的Cookie。Servlet不該使用response.setHeader("Set-Cookie", ...),而是應使用HttpServletResponse提供的專用方法addCookie。參見下文有關Cookie設置的討論。 |
WWW-Authenticate | 客戶應該在Authorization頭中提供什麼類型的受權信息?在包含401(Unauthorized)狀態行的應答中這個頭是必需的。例如,response.setHeader("WWW-Authenticate", "BASIC realm=\"executives\"")。 |
當瀏覽者訪問一個網頁時,瀏覽者的瀏覽器會向網頁所在服務器發出請求。當瀏覽器接收並顯示網頁前,此網頁所在的服務器會返回一個包含HTTP狀態碼的信息頭(server header)用以響應瀏覽器的請求。
HTTP狀態碼的英文爲HTTP Status Code。
下面是常見的HTTP狀態碼:
HTTP狀態碼由三個十進制數字組成,第一個十進制數字定義了狀態碼的類型,後兩個數字沒有分類的做用。HTTP狀態碼共分爲5種類型:
分類 | 分類描述 |
---|---|
1** | 信息,服務器收到請求,須要請求者繼續執行操做 |
2** | 成功,操做被成功接收並處理 |
3** | 重定向,須要進一步的操做以完成請求 |
4** | 客戶端錯誤,請求包含語法錯誤或沒法完成請求 |
5** | 服務器錯誤,服務器在處理請求的過程當中發生了錯誤 |
HTTP狀態碼列表:
狀態碼 | 狀態碼英文名稱 | 中文描述 |
---|---|---|
100 | Continue | 繼續。客戶端應繼續其請求 |
101 | Switching Protocols | 切換協議。服務器根據客戶端的請求切換協議。只能切換到更高級的協議,例如,切換到HTTP的新版本協議 |
200 | OK | 請求成功。通常用於GET與POST請求 |
201 | Created | 已建立。成功請求並建立了新的資源 |
202 | Accepted | 已接受。已經接受請求,但未處理完成 |
203 | Non-Authoritative Information | 非受權信息。請求成功。但返回的meta信息不在原始的服務器,而是一個副本 |
204 | No Content | 無內容。服務器成功處理,但未返回內容。在未更新網頁的狀況下,可確保瀏覽器繼續顯示當前文檔 |
205 | Reset Content | 重置內容。服務器處理成功,用戶終端(例如:瀏覽器)應重置文檔視圖。可經過此返回碼清除瀏覽器的表單域 |
206 | Partial Content | 部份內容。服務器成功處理了部分GET請求 |
300 | Multiple Choices | 多種選擇。請求的資源可包括多個位置,相應可返回一個資源特徵與地址的列表用於用戶終端(例如:瀏覽器)選擇 |
301 | Moved Permanently | 永久移動。請求的資源已被永久的移動到新URI,返回信息會包括新的URI,瀏覽器會自動定向到新URI。從此任何新的請求都應使用新的URI代替 |
302 | Found | 臨時移動。與301相似。但資源只是臨時被移動。客戶端應繼續使用原有URI |
303 | See Other | 查看其它地址。與301相似。使用GET和POST請求查看 |
304 | Not Modified | 未修改。所請求的資源未修改,服務器返回此狀態碼時,不會返回任何資源。客戶端一般會緩存訪問過的資源,經過提供一個頭信息指出客戶端但願只返回在指定日期以後修改的資源 |
305 | Use Proxy | 使用代理。所請求的資源必須經過代理訪問 |
306 | Unused | 已經被廢棄的HTTP狀態碼 |
307 | Temporary Redirect | 臨時重定向。與302相似。使用GET請求重定向 |
400 | Bad Request | 客戶端請求的語法錯誤,服務器沒法理解 |
401 | Unauthorized | 請求要求用戶的身份認證 |
402 | Payment Required | 保留,未來使用 |
403 | Forbidden | 服務器理解請求客戶端的請求,可是拒絕執行此請求 |
404 | Not Found | 服務器沒法根據客戶端的請求找到資源(網頁)。經過此代碼,網站設計人員可設置"您所請求的資源沒法找到"的個性頁面 |
405 | Method Not Allowed | 客戶端請求中的方法被禁止 |
406 | Not Acceptable | 服務器沒法根據客戶端請求的內容特性完成請求 |
407 | Proxy Authentication Required | 請求要求代理的身份認證,與401相似,但請求者應當使用代理進行受權 |
408 | Request Time-out | 服務器等待客戶端發送的請求時間過長,超時 |
409 | Conflict | 服務器完成客戶端的PUT請求是可能返回此代碼,服務器處理請求時發生了衝突 |
410 | Gone | 客戶端請求的資源已經不存在。410不一樣於404,若是資源之前有如今被永久刪除了可以使用410代碼,網站設計人員可經過301代碼指定資源的新位置 |
411 | Length Required | 服務器沒法處理客戶端發送的不帶Content-Length的請求信息 |
412 | Precondition Failed | 客戶端請求信息的先決條件錯誤 |
413 | Request Entity Too Large | 因爲請求的實體過大,服務器沒法處理,所以拒絕請求。爲防止客戶端的連續請求,服務器可能會關閉鏈接。若是隻是服務器暫時沒法處理,則會包含一個Retry-After的響應信息 |
414 | Request-URI Too Large | 請求的URI過長(URI一般爲網址),服務器沒法處理 |
415 | Unsupported Media Type | 服務器沒法處理請求附帶的媒體格式 |
416 | Requested range not satisfiable | 客戶端請求的範圍無效 |
417 | Expectation Failed | 服務器沒法知足Expect的請求頭信息 |
500 | Internal Server Error | 服務器內部錯誤,沒法完成請求 |
501 | Not Implemented | 服務器不支持請求的功能,沒法完成請求 |
502 | Bad Gateway | 充當網關或代理的服務器,從遠端服務器接收到了一個無效的請求 |
503 | Service Unavailable | 因爲超載或系統維護,服務器暫時的沒法處理客戶端的請求。延時的長度可包含在服務器的Retry-After頭信息中 |
504 | Gateway Time-out | 充當網關或代理的服務器,未及時從遠端服務器獲取請求 |
505 | HTTP Version not supported | 服務器不支持請求的HTTP協議的版本,沒法完成處理 |
Content-Type,內容類型,通常是指網頁中存在的Content-Type,用於定義網絡文件的類型和網頁的編碼,決定瀏覽器將以什麼形式、什麼編碼讀取這個文件,這就是常常看到一些Asp網頁點擊的結果倒是下載到的一個文件或一張圖片的緣由。
HTTP content-type 對照表
文件擴展名 | Content-Type(Mime-Type) | 文件擴展名 | Content-Type(Mime-Type) |
---|---|---|---|
.*( 二進制流,不知道下載文件類型) | application/octet-stream | .tif | image/tiff |
.001 | application/x-001 | .301 | application/x-301 |
.323 | text/h323 | .906 | application/x-906 |
.907 | drawing/907 | .a11 | application/x-a11 |
.acp | audio/x-mei-aac | .ai | application/postscript |
.aif | audio/aiff | .aifc | audio/aiff |
.aiff | audio/aiff | .anv | application/x-anv |
.asa | text/asa | .asf | video/x-ms-asf |
.asp | text/asp | .asx | video/x-ms-asf |
.au | audio/basic | .avi | video/avi |
.awf | application/vnd.adobe.workflow | .biz | text/xml |
.bmp | application/x-bmp | .bot | application/x-bot |
.c4t | application/x-c4t | .c90 | application/x-c90 |
.cal | application/x-cals | .cat | application/vnd.ms-pki.seccat |
.cdf | application/x-netcdf | .cdr | application/x-cdr |
.cel | application/x-cel | .cer | application/x-x509-ca-cert |
.cg4 | application/x-g4 | .cgm | application/x-cgm |
.cit | application/x-cit | .class | java/* |
.cml | text/xml | .cmp | application/x-cmp |
.cmx | application/x-cmx | .cot | application/x-cot |
.crl | application/pkix-crl | .crt | application/x-x509-ca-cert |
.csi | application/x-csi | .css | text/css |
.cut | application/x-cut | .dbf | application/x-dbf |
.dbm | application/x-dbm | .dbx | application/x-dbx |
.dcd | text/xml | .dcx | application/x-dcx |
.der | application/x-x509-ca-cert | .dgn | application/x-dgn |
.dib | application/x-dib | .dll | application/x-msdownload |
.doc | application/msword | .dot | application/msword |
.drw | application/x-drw | .dtd | text/xml |
.dwf | Model/vnd.dwf | .dwf | application/x-dwf |
.dwg | application/x-dwg | .dxb | application/x-dxb |
.dxf | application/x-dxf | .edn | application/vnd.adobe.edn |
.emf | application/x-emf | .eml | message/rfc822 |
.ent | text/xml | .epi | application/x-epi |
.eps | application/x-ps | .eps | application/postscript |
.etd | application/x-ebx | .exe | application/x-msdownload |
.fax | image/fax | .fdf | application/vnd.fdf |
.fif | application/fractals | .fo | text/xml |
.frm | application/x-frm | .g4 | application/x-g4 |
.gbr | application/x-gbr | . | application/x- |
.gif | image/gif | .gl2 | application/x-gl2 |
.gp4 | application/x-gp4 | .hgl | application/x-hgl |
.hmr | application/x-hmr | .hpg | application/x-hpgl |
.hpl | application/x-hpl | .hqx | application/mac-binhex40 |
.hrf | application/x-hrf | .hta | application/hta |
.htc | text/x-component | .htm | text/html |
.html | text/html | .htt | text/webviewhtml |
.htx | text/html | .icb | application/x-icb |
.ico | image/x-icon | .ico | application/x-ico |
.iff | application/x-iff | .ig4 | application/x-g4 |
.igs | application/x-igs | .iii | application/x-iphone |
.img | application/x-img | .ins | application/x-internet-signup |
.isp | application/x-internet-signup | .IVF | video/x-ivf |
.java | java/* | .jfif | image/jpeg |
.jpe | image/jpeg | .jpe | application/x-jpe |
.jpeg | image/jpeg | .jpg | image/jpeg |
.jpg | application/x-jpg | .js | application/x-javascript |
.jsp | text/html | .la1 | audio/x-liquid-file |
.lar | application/x-laplayer-reg | .latex | application/x-latex |
.lavs | audio/x-liquid-secure | .lbm | application/x-lbm |
.lmsff | audio/x-la-lms | .ls | application/x-javascript |
.ltr | application/x-ltr | .m1v | video/x-mpeg |
.m2v | video/x-mpeg | .m3u | audio/mpegurl |
.m4e | video/mpeg4 | .mac | application/x-mac |
.man | application/x-troff-man | .math | text/xml |
.mdb | application/msaccess | .mdb | application/x-mdb |
.mfp | application/x-shockwave-flash | .mht | message/rfc822 |
.mhtml | message/rfc822 | .mi | application/x-mi |
.mid | audio/mid | .midi | audio/mid |
.mil | application/x-mil | .mml | text/xml |
.mnd | audio/x-musicnet-download | .mns | audio/x-musicnet-stream |
.mocha | application/x-javascript | .movie | video/x-sgi-movie |
.mp1 | audio/mp1 | .mp2 | audio/mp2 |
.mp2v | video/mpeg | .mp3 | audio/mp3 |
.mp4 | video/mpeg4 | .mpa | video/x-mpg |
.mpd | application/vnd.ms-project | .mpe | video/x-mpeg |
.mpeg | video/mpg | .mpg | video/mpg |
.mpga | audio/rn-mpeg | .mpp | application/vnd.ms-project |
.mps | video/x-mpeg | .mpt | application/vnd.ms-project |
.mpv | video/mpg | .mpv2 | video/mpeg |
.mpw | application/vnd.ms-project | .mpx | application/vnd.ms-project |
.mtx | text/xml | .mxp | application/x-mmxp |
.net | image/pnetvue | .nrf | application/x-nrf |
.nws | message/rfc822 | .odc | text/x-ms-odc |
.out | application/x-out | .p10 | application/pkcs10 |
.p12 | application/x-pkcs12 | .p7b | application/x-pkcs7-certificates |
.p7c | application/pkcs7-mime | .p7m | application/pkcs7-mime |
.p7r | application/x-pkcs7-certreqresp | .p7s | application/pkcs7-signature |
.pc5 | application/x-pc5 | .pci | application/x-pci |
.pcl | application/x-pcl | .pcx | application/x-pcx |
application/pdf | application/pdf | ||
.pdx | application/vnd.adobe.pdx | .pfx | application/x-pkcs12 |
.pgl | application/x-pgl | .pic | application/x-pic |
.pko | application/vnd.ms-pki.pko | .pl | application/x-perl |
.plg | text/html | .pls | audio/scpls |
.plt | application/x-plt | .png | image/png |
.png | application/x-png | .pot | application/vnd.ms-powerpoint |
.ppa | application/vnd.ms-powerpoint | .ppm | application/x-ppm |
.pps | application/vnd.ms-powerpoint | .ppt | application/vnd.ms-powerpoint |
.ppt | application/x-ppt | .pr | application/x-pr |
.prf | application/pics-rules | .prn | application/x-prn |
.prt | application/x-prt | .ps | application/x-ps |
.ps | application/postscript | .ptn | application/x-ptn |
.pwz | application/vnd.ms-powerpoint | .r3t | text/vnd.rn-realtext3d |
.ra | audio/vnd.rn-realaudio | .ram | audio/x-pn-realaudio |
.ras | application/x-ras | .rat | application/rat-file |
.rdf | text/xml | .rec | application/vnd.rn-recording |
.red | application/x-red | .rgb | application/x-rgb |
.rjs | application/vnd.rn-realsystem-rjs | .rjt | application/vnd.rn-realsystem-rjt |
.rlc | application/x-rlc | .rle | application/x-rle |
.rm | application/vnd.rn-realmedia | .rmf | application/vnd.adobe.rmf |
.rmi | audio/mid | .rmj | application/vnd.rn-realsystem-rmj |
.rmm | audio/x-pn-realaudio | .rmp | application/vnd.rn-rn_music_package |
.rms | application/vnd.rn-realmedia-secure | .rmvb | application/vnd.rn-realmedia-vbr |
.rmx | application/vnd.rn-realsystem-rmx | .rnx | application/vnd.rn-realplayer |
.rp | image/vnd.rn-realpix | .rpm | audio/x-pn-realaudio-plugin |
.rsml | application/vnd.rn-rsml | .rt | text/vnd.rn-realtext |
.rtf | application/msword | .rtf | application/x-rtf |
.rv | video/vnd.rn-realvideo | .sam | application/x-sam |
.sat | application/x-sat | .sdp | application/sdp |
.sdw | application/x-sdw | .sit | application/x-stuffit |
.slb | application/x-slb | .sld | application/x-sld |
.slk | drawing/x-slk | .smi | application/smil |
.smil | application/smil | .smk | application/x-smk |
.snd | audio/basic | .sol | text/plain |
.sor | text/plain | .spc | application/x-pkcs7-certificates |
.spl | application/futuresplash | .spp | text/xml |
.ssm | application/streamingmedia | .sst | application/vnd.ms-pki.certstore |
.stl | application/vnd.ms-pki.stl | .stm | text/html |
.sty | application/x-sty | .svg | text/xml |
.swf | application/x-shockwave-flash | .tdf | application/x-tdf |
.tg4 | application/x-tg4 | .tga | application/x-tga |
.tif | image/tiff | .tif | application/x-tif |
.tiff | image/tiff | .tld | text/xml |
.top | drawing/x-top | .torrent | application/x-bittorrent |
.tsd | text/xml | .txt | text/plain |
.uin | application/x-icq | .uls | text/iuls |
.vcf | text/x-vcard | .vda | application/x-vda |
.vdx | application/vnd.visio | .vml | text/xml |
.vpg | application/x-vpeg005 | .vsd | application/vnd.visio |
.vsd | application/x-vsd | .vss | application/vnd.visio |
.vst | application/vnd.visio | .vst | application/x-vst |
.vsw | application/vnd.visio | .vsx | application/vnd.visio |
.vtx | application/vnd.visio | .vxml | text/xml |
.wav | audio/wav | .wax | audio/x-ms-wax |
.wb1 | application/x-wb1 | .wb2 | application/x-wb2 |
.wb3 | application/x-wb3 | .wbmp | image/vnd.wap.wbmp |
.wiz | application/msword | .wk3 | application/x-wk3 |
.wk4 | application/x-wk4 | .wkq | application/x-wkq |
.wks | application/x-wks | .wm | video/x-ms-wm |
.wma | audio/x-ms-wma | .wmd | application/x-ms-wmd |
.wmf | application/x-wmf | .wml | text/vnd.wap.wml |
.wmv | video/x-ms-wmv | .wmx | video/x-ms-wmx |
.wmz | application/x-ms-wmz | .wp6 | application/x-wp6 |
.wpd | application/x-wpd | .wpg | application/x-wpg |
.wpl | application/vnd.ms-wpl | .wq1 | application/x-wq1 |
.wr1 | application/x-wr1 | .wri | application/x-wri |
.wrk | application/x-wrk | .ws | application/x-ws |
.ws2 | application/x-ws | .wsc | text/scriptlet |
.wsdl | text/xml | .wvx | video/x-ms-wvx |
.xdp | application/vnd.adobe.xdp | .xdr | text/xml |
.xfd | application/vnd.adobe.xfd | .xfdf | application/vnd.adobe.xfdf |
.xhtml | text/html | .xls | application/vnd.ms-excel |
.xls | application/x-xls | .xlw | application/x-xlw |
.xml | text/xml | .xpl | audio/scpls |
.xq | text/xml | .xql | text/xml |
.xquery | text/xml | .xsd | text/xml |
.xsl | text/xml | .xslt | text/xml |
.xwd | application/x-xwd | .x_b | application/x-x_b |
.sis | application/vnd.symbian.install | .sisx | application/vnd.symbian.install |
.x_t | application/x-x_t | .ipa | application/vnd.iphone |
.apk | application/vnd.android.package-archive | .xap | application/x-silverlight-app |