{"id":801,"date":"2025-10-24T15:04:46","date_gmt":"2025-10-24T07:04:46","guid":{"rendered":"https:\/\/www.youvii.site\/?p=801"},"modified":"2025-10-24T15:09:23","modified_gmt":"2025-10-24T07:09:23","slug":"javascriptjichu","status":"publish","type":"post","link":"https:\/\/www.youvii.site\/index.php\/archives\/javascriptjichu","title":{"rendered":"JavaScript\u57fa\u7840"},"content":{"rendered":"<h1>JavaScript\u57fa\u7840<\/h1>\n<h1>\u6982\u8ff0<\/h1>\n<p>avaScript \u88ab\u7528\u6765\u6539\u8fdb\u8bbe\u8ba1\u3001\u9a8c\u8bc1\u8868\u5355\u3001\u68c0\u6d4b\u6d4f\u89c8\u5668\u3001\u521b\u5efa cookies\uff0c\u7b49\u7b49 \u3002<\/p>\n<p>JavaScript \u662f\u56e0\u7279\u7f51\u4e0a\u6700\u6d41\u884c\u7684\u811a\u672c\u8bed\u8a00\uff0c\u5e76\u4e14\u53ef\u5728\u6240\u6709\u4e3b\u8981\u7684\u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c\uff0c<\/p>\n<p>\u6bd4\u5982\uff1a Internet Explorer\u3001Maxthon\u3001Mozilla\u3001Firefox\u3001Netscape\u3001Chrome \u548c Opera\u7b49\u3002<\/p>\n<p>\u5e38\u7528 1 \u4fee\u6539 html \u53ca css \u4ee3\u7801 \uff082\uff09\u9a8c\u8bc1\u8868\u5355<\/p>\n<p>JavaScript\u548cJava\u6ca1\u6709\u5173\u7cfb<\/p>\n<h1>\u5d4c\u5165\u65b9\u6cd5<\/h1>\n<h2>\u5185\u5d4c\u5f0f<\/h2>\n<p>\u7406\u8bba\u4e0a js \u53ef\u4ee5\u5199\u5728\u4efb\u4f55\u7b2c\u4e00\u4e2a\u5730\u65b9 \u4f46\u662f\u4e00\u822c\u5199\u5728 head \u6807\u7b7e\u91cc\u6216\u8005 body \u4e0b<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">&lt;script type=\"application\/javascript\"&gt;\nalert(\"\u5185\u5d4c\u5f0f\");\n&lt;\/script&gt;\n&lt;script&gt;alert(\"\u5185\u5d4c\u5f0f\");&lt;\/script&gt;<\/code><\/pre>\n<h2>\u5916\u94fe\u5f0f<\/h2>\n<p>\u9996\u5148\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6\u7c7b\u578b\u4e3a.js \u7684\u6587\u4ef6\uff0c\u7136\u540e\u5728\u8be5\u6587\u4ef6\u4e2d\u5199 js \u8bed\u53e5\uff0c\u901a\u8fc7 script \u6807<\/p>\n<p>\u7b7e\u5bf9\u5f15\u5165\u5230 html \u9875\u9762\u4e2d\u3002<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">&lt;script src=\"js \u6587\u4ef6\u8def\u5f84\u5730\u5740\"&gt;\u8fd9\u91cc\u4e0d\u80fd\u5199 js \u8bed\u53e5&lt;\/script&gt;<\/code><\/pre>\n<h2>\u884c\u5185\u5f0f<\/h2>\n<p>\u76f4\u63a5\u4e66\u5199\u5728\u6807\u7b7e\u8eab\u4e0a\uff0c\u662f\u4e00\u4e2a\u7b80\u5199\u7684\u4e8b\u4ef6\uff0c\u6240\u4ee5\u53c8\u79f0\u4e4b\u4e3a\u4e8b\u4ef6\u5c5e\u6027\u3002 onclick<\/p>\n<p>\u5355\u51fb\u4e8b\u4ef6<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">&lt;input type=\"button\" value=\"\u70b9\u6211\u5440!\" onclick=\"alert('\u6d4b\u8bd5');\"&gt;\n&lt;button onclick=\"alert('\u6d4b\u8bd5');\"&gt;\u70b9\u6211\u5440!&lt;\/button&gt;<\/code><\/pre>\n<h1>\u8bed\u53e5<\/h1>\n<p>1.\u7f16\u7a0b\u6307\u4ee4\u88ab\u79f0\u4e3a\u8bed\u53e5\u3002<\/p>\n<p>JavaScript \u7a0b\u5e8f\u5c31\u662f\u4e00\u7cfb\u5217\u7684\u7f16\u7a0b\u8bed\u53e5\u3002<\/p>\n<p>\u6ce8\u91ca\uff1a\u5728 HTML \u4e2d\uff0cJavaScript \u7a0b\u5e8f\u7531 web \u6d4f\u89c8\u5668\u6267\u884c\u3002<\/p>\n<p>2.JavaScript \u8bed\u53e5\u7531\u4ee5\u4e0b\u6784\u6210\uff1a<\/p>\n<p>\u503c\u3001\u8fd0\u7b97\u7b26\u3001\u8868\u8fbe\u5f0f\u3001\u5173\u952e\u8bcd\u548c\u6ce8\u91ca\u3002<\/p>\n<p>3.\u7528\u5206\u53f7\uff08;\uff09\u5206\u9694 JavaScript \u8bed\u53e5\u3002<\/p>\n<h1>\u6ce8\u91ca<\/h1>\n<p>\u884c\u6ce8\u91ca\uff1a \/\/ \u6ce8\u91ca\u8bed\u53e5 \u5feb\u6377\u952e ctrl+\/<\/p>\n<p>\u591a\u884c\u6ce8\u91ca\uff1a \/<em> \u6ce8\u91ca\u8bed\u53e5 <\/em>\/ \u5feb\u6377\u952e ctrl+shift+\/<\/p>\n<p>\u6ce8\u610f\uff1a\u591a\u884c\u6ce8\u91ca\u76f8\u4e92\u4e0d\u80fd\u5d4c\u5957\u4f7f\u7528\uff0c\u53ea\u80fd\u5728\u591a\u884c\u6ce8\u91ca\u91cc\u9762\u4f7f\u7528\u5355\u884c\u6ce8\u91ca\uff01<\/p>\n<h1>\u53d8\u91cf<\/h1>\n<p>\u53d8\u91cf\u662f\u7528\u4e8e\u5b58\u50a8\u4fe1\u606f\u7684&quot;\u5bb9\u5668&quot;<\/p>\n<p>javascript \u5355\u53cc\u5f15\u53f7\u6ca1\u533a\u522b<\/p>\n<p>var a=\u2019\u5b57\u7b26\u4e32\u2019;<\/p>\n<h1>JavaScript\u4fdd\u7559\u5173\u952e\u5b57<\/h1>\n<p>Javascript \u7684\u4fdd\u7559\u5173\u952e\u5b57\u4e0d\u53ef\u4ee5\u7528\u4f5c\u53d8\u91cf\u3001\u6807\u7b7e\u6216\u8005\u51fd\u6570\u540d\u3002\u6709\u4e9b\u4fdd\u7559\u5173\u952e\u5b57\u662f\u4f5c<\/p>\n<p>\u4e3a Javascript \u4ee5\u540e\u6269\u5c55\u4f7f\u7528\u3002<\/p>\n<div class=\"table-responsive\"><table class=\"table\" >\n<thead>\n<tr>\n<th>\u4fdd\u7559\u5173\u952e\u5b57<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>abstract<\/td>\n<\/tr>\n<tr>\n<td>arguments<\/td>\n<\/tr>\n<tr>\n<td>await*<\/td>\n<\/tr>\n<tr>\n<td>boolean<\/td>\n<\/tr>\n<tr>\n<td>break<\/td>\n<\/tr>\n<tr>\n<td>byte<\/td>\n<\/tr>\n<tr>\n<td>case<\/td>\n<\/tr>\n<tr>\n<td>catch<\/td>\n<\/tr>\n<tr>\n<td>char<\/td>\n<\/tr>\n<tr>\n<td>class*<\/td>\n<\/tr>\n<tr>\n<td>const<\/td>\n<\/tr>\n<tr>\n<td>continue<\/td>\n<\/tr>\n<tr>\n<td>debugger<\/td>\n<\/tr>\n<tr>\n<td>default<\/td>\n<\/tr>\n<tr>\n<td>delete<\/td>\n<\/tr>\n<tr>\n<td>do<\/td>\n<\/tr>\n<tr>\n<td>double<\/td>\n<\/tr>\n<tr>\n<td>else<\/td>\n<\/tr>\n<tr>\n<td>enum*<\/td>\n<\/tr>\n<tr>\n<td>eval<\/td>\n<\/tr>\n<tr>\n<td>export*<\/td>\n<\/tr>\n<tr>\n<td>extends*<\/td>\n<\/tr>\n<tr>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td>final<\/td>\n<\/tr>\n<tr>\n<td>finally<\/td>\n<\/tr>\n<tr>\n<td>float<\/td>\n<\/tr>\n<tr>\n<td>for<\/td>\n<\/tr>\n<tr>\n<td>function<\/td>\n<\/tr>\n<tr>\n<td>goto<\/td>\n<\/tr>\n<tr>\n<td>if<\/td>\n<\/tr>\n<tr>\n<td>implements<\/td>\n<\/tr>\n<tr>\n<td>import*<\/td>\n<\/tr>\n<tr>\n<td>in<\/td>\n<\/tr>\n<tr>\n<td>instanceof<\/td>\n<\/tr>\n<tr>\n<td>int<\/td>\n<\/tr>\n<tr>\n<td>interface<\/td>\n<\/tr>\n<tr>\n<td>let*<\/td>\n<\/tr>\n<tr>\n<td>long<\/td>\n<\/tr>\n<tr>\n<td>native<\/td>\n<\/tr>\n<tr>\n<td>new<\/td>\n<\/tr>\n<tr>\n<td>null<\/td>\n<\/tr>\n<tr>\n<td>package<\/td>\n<\/tr>\n<tr>\n<td>private<\/td>\n<\/tr>\n<tr>\n<td>protected<\/td>\n<\/tr>\n<tr>\n<td>public<\/td>\n<\/tr>\n<tr>\n<td>return<\/td>\n<\/tr>\n<tr>\n<td>short<\/td>\n<\/tr>\n<tr>\n<td>static<\/td>\n<\/tr>\n<tr>\n<td>super*<\/td>\n<\/tr>\n<tr>\n<td>switch<\/td>\n<\/tr>\n<tr>\n<td>synchronized<\/td>\n<\/tr>\n<tr>\n<td>this<\/td>\n<\/tr>\n<tr>\n<td>throw<\/td>\n<\/tr>\n<tr>\n<td>throws<\/td>\n<\/tr>\n<tr>\n<td>transient<\/td>\n<\/tr>\n<tr>\n<td>true<\/td>\n<\/tr>\n<tr>\n<td>try<\/td>\n<\/tr>\n<tr>\n<td>typeof<\/td>\n<\/tr>\n<tr>\n<td>var<\/td>\n<\/tr>\n<tr>\n<td>void<\/td>\n<\/tr>\n<tr>\n<td>volatile<\/td>\n<\/tr>\n<tr>\n<td>while<\/td>\n<\/tr>\n<tr>\n<td>with<\/td>\n<\/tr>\n<tr>\n<td>yield<\/td>\n<\/tr>\n<tr>\n<td>\u6ce8\u610f\uff1a\u5e26\u661f\u53f7(*)\u6807\u6ce8\u7684\u5173\u952e\u5b57\u662f\u5728ES6(ES2015)\u6216\u4e4b\u540e\u7684\u7248\u672c\u4e2d\u5f15\u5165\u7684\u3002\u5176\u4e2d<code>await<\/code>\u548c<code>yield<\/code>\u53ea\u80fd\u5728\u7279\u5b9a\u4e0a\u4e0b\u6587\u4e2d\u4f7f\u7528\uff08\u5982\u751f\u6210\u5668\u51fd\u6570\u5185\uff09\u3002\u6b64\u5916\uff0c\u867d\u7136<code>enum<\/code>\u88ab\u5217\u5728\u8fd9\u91cc\uff0c\u4f46\u5b83\u5e76\u4e0d\u662f\u4e00\u4e2a\u771f\u6b63\u7684\u4fdd\u7559\u5b57\uff1b\u5b83\u53ef\u4ee5\u901a\u8fc7<code>--allowReserved<\/code>\u9009\u9879\u5728\u67d0\u4e9b\u73af\u5883\u4e2d\u4f7f\u7528\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h1>\u4f5c\u7528\u57df<\/h1>\n<h2>\u5c40\u90e8\u53d8\u91cf<\/h2>\n<p>\u5c40\u90e8\u4f5c\u7528\u57df \u53d8\u91cf\u5728\u51fd\u6570\u5185\u58f0\u660e\uff0c\u53d8\u91cf\u4e3a\u5c40\u90e8\u4f5c\u7528\u57df\u3002<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">function myFunction() {\nvar carName = \"Volvo\";\n\/\/ \u51fd\u6570\u5185\u53ef\u8c03\u7528 carName \u53d8\u91cf\n}<\/code><\/pre>\n<h2>\u5168\u5c40\u53d8\u91cf<\/h2>\n<p>\u53d8\u91cf\u5728\u51fd\u6570\u5916\u5b9a\u4e49\uff0c\u5373\u4e3a\u5168\u5c40\u53d8\u91cf\u3002<\/p>\n<p>\u5168\u5c40\u53d8\u91cf\u6709 \u5168\u5c40\u4f5c\u7528\u57df: \u7f51\u9875\u4e2d\u6240\u6709\u811a\u672c\u548c\u51fd\u6570\u5747\u53ef\u4f7f\u7528\u3002<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">var carName = \" Volvo\";\n\/\/ \u6b64\u5904\u53ef\u8c03\u7528 carName \u53d8\u91cf\nfunction myFunction() {\n\/\/ \u51fd\u6570\u5185\u53ef\u8c03\u7528 carName \u53d8\u91cf\n}<\/code><\/pre>\n<h1>\u6570\u636e\u7c7b\u578b<\/h1>\n<p>\u6570\u503c\u578b\uff1anumber\uff08\u51e1\u662f\u6570\u5b57\u90fd\u662f\u6570\u503c\u578b\uff0c\u4e0d\u533a\u5206\u6574\u6570\u548c\u5c0f\u6570\uff09<\/p>\n<p>\u5b57\u7b26\u4e32\uff1astring\uff08\u51e1\u662f\u5f15\u53f7\u5305\u88f9\u8d77\u6765\u7684\u5185\u5bb9\u5168\u90e8\u90fd\u662f\u5b57\u7b26\u4e32\uff09<\/p>\n<p>\u5e03\u5c14\uff1aboolean\uff08true\u3001false\uff09<\/p>\n<p>\u5bf9\u8c61\u7c7b\u578b\uff1aobject\uff08\u7279\u6b8a\u53d6\u503c null\uff09<\/p>\n<p>\u672a\u5b9a\u4e49\u578b\uff1aundefined<\/p>\n<p>\u5bf9\u8c61\u7c7b\u578b \u6570\u7ec4 \u5b57\u5178<\/p>\n<h1>\u5224\u65ad\u7c7b\u578b<\/h1>\n<p>var a = &quot;iamstring.&quot;;<\/p>\n<p>var b = 222;<\/p>\n<p>var c= [1,2,3];<\/p>\n<p>var d = new Date();<\/p>\n<p>var e = function(){alert(111);};<\/p>\n<p>var f = function(){this.name=&quot;22&quot;;};<\/p>\n<p>alert(typeof a) &#8212;&#8212;&#8212;&#8212;&gt; string<\/p>\n<p>alert(typeof b) &#8212;&#8212;&#8212;&#8212;&gt; number<\/p>\n<p>alert(typeof c) &#8212;&#8212;&#8212;&#8212;&gt; object<\/p>\n<p>alert(typeof d) &#8212;&#8212;&#8212;&#8212;&gt; object<\/p>\n<p>alert(typeof e) &#8212;&#8212;&#8212;&#8212;&gt; function<\/p>\n<p>alert(typeof f) &#8212;&#8212;&#8212;&#8212;&gt; function<\/p>\n<h1>\u6570\u5b57\u7c7b\u578b<\/h1>\n<p>\u53ea\u6709\u4e00\u79cd\u6570\u5b57\u7c7b\u578b\uff0c\u6570\u5b57 \u53ef\u4ee5\u662f\u5c0f\u6570 \uff0c\u4e5f\u53ef\u4ee5\u7684\u6574\u6570<\/p>\n<p>\u4ee5 0 \u5f00\u5934 \u9ed8\u8ba4\u4f7f\u7528 8 \u8fdb\u5236\u6765\u8868\u793a\u6211\u7684\u8fd9\u4e2a\u6570\u5b57<\/p>\n<p>\u4ee5 0x \u5f00\u5934 \u9ed8\u8ba4\u4f7f\u7528 16 \u8fdb\u5236\u6765\u8868\u8ff0\u6211\u7684\u8fd9\u4e2a\u6570\u5b57<\/p>\n<p>\u5982\u679c\u4ee5-\u5f00\u5934 \u9ed8\u8ba4\u4ee5\u8d1f\u6570<\/p>\n<p>\u5982\u679c\u6211\u5e26\u6709 e\uff1a\u4ee5\u79d1\u5b66\u8ba1\u6570\u6cd5\u6765\u89e3\u6790\u6211\u7684\u8fd9\u4e2a\u6570\u5b57<\/p>\n<p>parseInt(..) \u5c06\u67d0\u503c\u8f6c\u6362\u6210\u6570\u5b57\uff0c\u4e0d\u6210\u529f\u5219 NaN<\/p>\n<p>parseFloat(..) \u5c06\u67d0\u503c\u8f6c\u6362\u6210\u6d6e\u70b9\u6570\uff0c\u4e0d\u6210\u529f\u5219 NaN<\/p>\n<p>\u7279\u6b8a\u503c\uff1a<\/p>\n<p>NaN\uff0c\u975e\u6570\u5b57\u3002\u53ef\u4f7f\u7528 isNaN(num) \u6765\u5224\u65ad\u3002<\/p>\n<p>Infinity\uff0c\u65e0\u7a77\u5927\u3002\u53ef\u4f7f\u7528 isFinite(num) \u6765\u5224\u65ad\u3002<\/p>\n<h1>\u5b57\u7b26\u4e32\u578b<\/h1>\n<p>\u5b57\u7b26\u4e32\u662f\u5b58\u50a8\u5b57\u7b26\u7684\u53d8\u91cf\uff0c\u7528\u6765\u8868\u793a\u6587\u672c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u7a0b\u5e8f\u4e2d\u7684\u5b57\u7b26\u4e32\u662f\u5305\u542b<\/p>\n<p>\u5355\u5f15\u53f7\/\u53cc\u5f15\u53f7\u7684\uff0c\u7531\u5355\u5f15\u53f7\u6765\u754c\u5b9a\u6211\u53cc\u5f15\u53f7\u4e2d\u5305\u542b\u7684\u5b57\u7b26\u4e32<\/p>\n<p>obj.length \u957f\u5ea6<\/p>\n<p>obj.trim() \u79fb\u9664\u7a7a\u767d<\/p>\n<p>obj.trimLeft()<\/p>\n<p>obj.trimRight)<\/p>\n<p>obj.charAt(n) \u8fd4\u56de\u5b57\u7b26\u4e32\u4e2d\u7684\u7b2c n \u4e2a\u5b57\u7b26<\/p>\n<p>obj.concat(value, &#8230;) \u62fc\u63a5<\/p>\n<p>obj.indexOf(substring,start) \u5b50\u5e8f\u5217\u4f4d\u7f6e<\/p>\n<p>obj.lastIndexOf(substring,start) \u5b50\u5e8f\u5217\u4f4d\u7f6e<\/p>\n<p>obj.substring(from, to) \u6839\u636e\u7d22\u5f15\u83b7\u53d6\u5b50\u5e8f\u5217<\/p>\n<p>obj.slice(<\/p>\n<p>, end) \u5207\u7247<\/p>\n<p>obj.toLowerCase() \u5927\u5199<\/p>\n<p>obj.toUpperCase() \u5c0f\u5199<\/p>\n<p>obj.split(delimiter, limit) \u5206\u5272<\/p>\n<p>obj.search(regexp) \u4ece\u5934\u5f00\u59cb\u5339\u914d\uff0c\u8fd4\u56de\u5339\u914d\u6210\u529f\u7684\u7b2c\u4e00\u4e2a\u4f4d\u7f6e(g \u65e0\u6548)<\/p>\n<p>obj.match(regexp) \u5168\u5c40\u641c\u7d22\uff0c\u5982\u679c\u6b63\u5219\u4e2d\u6709 g \u8868\u793a\u627e\u5230\u5168\u90e8\uff0c\u5426\u5219\u53ea<\/p>\n<p>\u627e\u5230\u7b2c\u4e00\u4e2a\u3002<\/p>\n<p>obj.replace(regexp, replacement) \u66ff\u6362\uff0c\u6b63\u5219\u4e2d\u6709 g \u5219\u66ff\u6362\u6240\u6709\uff0c\u5426\u5219\u53ea\u66ff\u6362\u7b2c<\/p>\n<p>\u4e00\u4e2a\u5339\u914d\u9879\uff0c<\/p>\n<p>$\u6570\u5b57\uff1a\u5339\u914d\u7684\u7b2c n \u4e2a\u7ec4\u5185\u5bb9\uff1b<\/p>\n<p>$&amp;\uff1a\u5f53\u524d\u5339\u914d\u7684\u5185\u5bb9\uff1b<\/p>\n<p>$`\uff1a\u4f4d\u4e8e\u5339\u914d\u5b50\u4e32\u5de6\u4fa7\u7684\u6587\u672c\uff1b<\/p>\n<p>$&#8217;\uff1a\u4f4d\u4e8e\u5339\u914d\u5b50\u4e32\u53f3\u4fa7\u7684\u6587\u672c<\/p>\n<p>$$\uff1a\u76f4\u63a5\u91cf$\u7b26\u53f7<\/p>\n<h1>\u5e03\u5c14\u7c7b\u578b<\/h1>\n<p>\u4e00\u822c\u662f\u7528\u5728\u6d41\u7a0b\u63a7\u5236\u8bed\u53e5\u4e2d\uff0c\u5b57\u7b26\u4e32\u548c\u6570\u5b57\u7c7b\u578b\u90fd\u662f\u65e0\u7a77\u591a\u4e2a\uff0c\u7136\u800c\u6211\u4eec\u7684\u5e03<\/p>\n<p>\u5c14\u6570\u636e\u7c7b\u578b\u53ea\u6709\u4e24\u4e2a\uff1atrue \u548c false<\/p>\n<p>\u8fd9\u4e24\u4e2a\u4e2a\u503c\u4e00\u822c\u7528\u4e8e\u8bf4\u660e\u67d0\u4e2a\u4e8b\u7269\u662f\u771f\u6216\u8005\u5047<\/p>\n<p>js \u4e00\u822c\u7528\u5e03\u5c14\u7c7b\u578b\u6765\u6bd4\u8f83\u6240\u5f97\u5230\u7684\u7ed3\u679c<\/p>\n<p>\u5e03\u5c14\u7c7b\u578b\u4ec5\u5305\u542b\u771f\u5047\uff0c<\/p>\n<p>== \u6bd4\u8f83\u503c\u76f8\u7b49<\/p>\n<p>!= \u4e0d\u7b49\u4e8e<\/p>\n<p>=== \u6bd4\u8f83\u503c\u548c\u7c7b\u578b\u76f8\u7b49<\/p>\n<p>!=== \u4e0d\u7b49\u4e8e<\/p>\n<p>|| \u6216<\/p>\n<p>&amp;&amp; \u4e14<\/p>\n<h1>null<\/h1>\n<p>null<\/p>\n<p>\u5173\u952e\u5b57 null \u662f\u4e00\u4e2a\u7279\u6b8a\u7684\u503c\uff0c\u5b83\u8868\u793a\u53d8\u91cf\u4e3a\u7a7a\u503c\uff0c\u7528\u6765\u5b9a\u4e49\u7a7a\u7684\u6216\u8005\u662f\u4e0d\u5b58\u5728<\/p>\n<p>\u7684\u5f15\u7528\u3002<\/p>\n<p>\u5982\u679c\u8bd5\u56fe\u53bb\u5f15\u7528\u4e00\u4e2a\u6ca1\u6709\u5b9a\u4e49\u7684\u503c\uff0c\u5c31\u4f1a\u8fd4\u56de\u4e00\u4e2a null\u3002<\/p>\n<p>\u8fd9\u91cc\u6ce8\u610f\u4e00\u70b9\uff1anull \u5e76\u4e0d\u7b49\u4e8e&quot;&quot; \u6216\u8005 0<\/p>\n<h1>undefined<\/h1>\n<p>\u8fd9\u4e2a\u503c\u8868\u793a\u53d8\u91cf\u4e0d\u542b\u6709\u503c\uff0c\u6ca1\u6709\u5b9a\u4e49\u7684\u503c\uff0c\u6216\u8005\u88ab\u5b9a\u4e49\u4e86\u4e00\u4e2a\u4e0d\u5b58\u5728\u7684\u5c5e\u6027\u503c<\/p>\n<p>\uff01null \u548c undefined \u533a\u522b\uff1a<\/p>\n<p>null \u5b83\u8868\u793a\u4e00\u4e2a\u53d8\u91cf\u88ab\u8d4b\u4e88\u4e00\u4e2a\u7a7a\u503c\uff0c\u800c undefined \u662f\u8868\u793a\u53d8\u91cf\u8fd8\u6ca1\u6709\u88ab\u8d4b\u503c<\/p>\n<h1>\u6570\u7ec4<\/h1>\n<p>1\u3001\u6570\u7ec4\u5185\u53ef\u4ee5\u5b58\u653e\u4efb\u610f\u6570\u636e\u7c7b\u578b\u7684\u6570\u636e\uff08\u672c\u8d28\u4e0a\u5b83\u4e5f\u662f\u5bf9\u8c61\uff09<\/p>\n<p>2\u3001\u6570\u7ec4\u5143\u7d20\u4e0d\u8d4b\u503c\u7684\u60c5\u51b5\u4e0b \u503c\u4e3a undefined<\/p>\n<p>3\u3001\u5982\u679c\u6570\u7ec4\u6253\u5370\u7684\u65f6\u5019\uff0c\u5143\u7d20\u4e0d\u8d4b\u503c&quot;&quot;<\/p>\n<p>4\u3001\u8bbf\u95ee\u6570\u7ec4\u8303\u56f4\u4e4b\u5916\u7684\u5143\u7d20\uff0c\u4e0d\u4f1a\u51fa\u73b0\u8d8a\u754c\u7684\u95ee\u9898\uff0cundefined<\/p>\n<p>5\u3001\u5b9a\u4e49\u6570\u7ec4\u5927\u5c0f\uff0c\u7167\u6837\u53ef\u4ee5\u6dfb\u52a0\u66f4\u591a\u5143\u7d20<\/p>\n<h2>\u5b9a\u4e49\u6570\u7ec4\u7684\u65b9\u6cd5<\/h2>\n<p>1\u3001var arr=[]\/\/\u5b9a\u4e49\u4e00\u4e2a\u7a7a\u6570\u7ec4<\/p>\n<p>2\u3001var arr=[10,20,{&quot;name&quot;:&quot;tomy&quot;,&quot;age&quot;:19},0.1,&quot;string&quot;,true,[&quot;aaa&quot;,&quot;bbb&quot;]]\/\/\u5b9a\u4e49\u7684<\/p>\n<p>\u540c\u65f6\u8d4b\u503c<\/p>\n<p>3\u3001var arr=new Array();\/\/\u5b9a\u4e49\u4e00\u4e2a\u7a7a\u6570\u7ec4<\/p>\n<p>4\u3001var arr = new Array(10,20,{&quot;name&quot;:&quot;tomy&quot;,&quot;age&quot;:19},0.1,&quot;string&quot;,true,<\/p>\n<p>[&quot;aaa&quot;,&quot;bbb&quot;])\/\/\u5b9a\u4e49\u7684\u540c\u65f6\u8d4b\u503c<\/p>\n<p>5\u3001var arr=new Array(10)\/\/\u5b9a\u4e49\u4e00\u4e2a\u957f\u5ea6\u4e3a 10 \u7684\u6570\u7ec4<\/p>\n<h2>\u6570\u7ec4\u7684\u64cd\u4f5c<\/h2>\n<p>obj.length \u6570\u7ec4\u7684\u5927\u5c0f<\/p>\n<p>obj.push(ele) \u5c3e\u90e8\u8ffd\u52a0\u5143\u7d20<\/p>\n<p>obj.pop() \u5c3e\u90e8\u83b7\u53d6\u4e00\u4e2a\u5143\u7d20<\/p>\n<p>obj.unshift(ele) \u5934\u90e8\u63d2\u5165\u5143\u7d20<\/p>\n<p>obj.shift() \u5934\u90e8\u79fb\u9664\u5143\u7d20<\/p>\n<p>obj.splice(start, deleteCount, value, &#8230;) \u63d2\u5165\u3001\u5220\u9664\u6216\u66ff\u6362\u6570\u7ec4\u7684\u5143\u7d20<\/p>\n<p>obj.splice(n,0,val) \u6307\u5b9a\u4f4d\u7f6e\u63d2\u5165\u5143\u7d20<\/p>\n<p>obj.splice(n,1,val) \u6307\u5b9a\u4f4d\u7f6e\u66ff\u6362\u5143\u7d20<\/p>\n<p>obj.splice(n,1) \u6307\u5b9a\u4f4d\u7f6e\u5220\u9664\u5143\u7d20<\/p>\n<p>obj.slice( ) \u5207\u7247<\/p>\n<p>obj.reverse( ) \u53cd\u8f6c<\/p>\n<p>obj.join(sep) \u5c06\u6570\u7ec4\u5143\u7d20\u8fde\u63a5\u8d77\u6765\u4ee5\u6784\u5efa\u4e00\u4e2a\u5b57\u7b26\u4e32<\/p>\n<p>obj.concat(val,..) \u8fde\u63a5\u6570\u7ec4<\/p>\n<p>obj.sort( ) \u5bf9\u6570\u7ec4\u5143\u7d20\u8fdb\u884c\u6392\u5e8f<\/p>\n<h1>\u51fd\u6570<\/h1>\n<p>JavaScript \u51fd\u6570\u8bed\u6cd5<\/p>\n<p>JavaScript \u51fd\u6570\u901a\u8fc7 function \u5173\u952e\u8bcd\u8fdb\u884c\u5b9a\u4e49\uff0c\u5176\u540e\u662f\u51fd\u6570\u540d\u548c\u62ec\u53f7 ()\u3002<\/p>\n<p>\u51fd\u6570\u540d\u53ef\u5305\u542b\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u4e0b\u5212\u7ebf\u548c\u7f8e\u5143\u7b26\u53f7\uff08\u89c4\u5219\u4e0e\u53d8\u91cf\u540d\u76f8\u540c\uff09\u3002<\/p>\n<p>\u5706\u62ec\u53f7\u53ef\u5305\u62ec\u7531\u9017\u53f7\u5206\u9694\u7684\u53c2\u6570\uff1a<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">var x = myFunction(7, 8); \/\/ \u8c03\u7528\u51fd\u6570\uff0c\u8fd4\u56de\u503c\u88ab\u8d4b\u503c\u7ed9 x\nfunction myFunction(a, b) {\nreturn a * b; \/\/ \u51fd\u6570\u8fd4\u56de a \u548c b \u7684\u4e58\u79ef\n}<\/code><\/pre>\n<p><strong>\u666e\u901a\u51fd\u6570<\/strong><\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">function func(arg){\nreturn arg+1;\n}\nvar result = func(1);\nconsole.log(result); var result = func(1);\nconsole.log(result);<\/code><\/pre>\n<p><strong>\u533f\u540d\u51fd\u6570\uff08\u6ca1\u6709\u540d\u5b57\u7684\u51fd\u6570\uff09<\/strong><\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">setInterval(function(){\nconsole.log(123);\n},500)<\/code><\/pre>\n<p><strong>\u81ea\u6267\u884c\u51fd\u6570\uff08\u521b\u5efa\u51fd\u6570\u5e76\u81ea\u52a8\u6267\u884c\uff09<\/strong><\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">(function(arg){\nconsole.log(arg);\n})(1);<\/code><\/pre>\n<h1>\u5b57\u5178<\/h1>\n<p>\u5b57\u5178 \u662f\u4e00\u79cd\u4ee5\u952e-\u503c\u5bf9\u5f62\u5f0f\u5b58\u50a8\u6570\u636e\u7684\u6570\u636e\u7ed3\u6784<\/p>\n<p>var dict = {&#8216;k1&#8242;:&quot;moonsec&quot;,&#8217;k2&#8242;:&#8217;moon&#8217;,&#8217;age&#8217;:18};<\/p>\n<p>\u8f93\u51fa\u5b57\u5178\u5143\u7d20<\/p>\n<p>for(var item in dict){<\/p>\n<p>console.log(dict[item]);<\/p>\n<p>}<\/p>\n<p>\u83b7\u53d6\u6307\u5b9a\u5143\u7d20<\/p>\n<p>dict[&#8216;age&#8217;] \u83b7\u53d6 key \u4e3a age \u7684\u5143\u7d20<\/p>\n<p>\u8d4b\u503c<\/p>\n<p>dict[&#8216;age&#8217;]=10<\/p>\n<p>\u5220\u9664\u5143\u7d20<\/p>\n<p>delete dict[&#8216;one&#8217;];<\/p>\n<p>delete dict.age;<\/p>\n<h1>JS\u7684\u5e8f\u5217\u5316\u548c\u53cd\u5e8f\u5217\u5316<\/h1>\n<p>Json \u4e0e\u5b57\u7b26\u4e32\u7684\u8f6c\u6362<\/p>\n<p>\u628a\u5bf9\u8c61\u8f6c\u4e3a\u5b57\u7b26\u4e32<\/p>\n<p>JSON.stringify()<\/p>\n<p>\u628a\u5b57\u7b26\u4e32\u8f6c\u4e3a\u6570\u7ec4<\/p>\n<p>newli = JSON.parse()<\/p>\n<p>\u5e8f\u5217\u5316 \u5373 js \u4e2d\u7684 Object \u8f6c\u5316\u4e3a\u5b57\u7b26\u4e32<\/p>\n<p>\u4f7f\u7528 toJSONString<\/p>\n<p>var last=obj.toJSONString(); \/\/\u5c06 JSON \u5bf9\u8c61\u8f6c\u5316\u4e3a JSON \u5b57\u7b26<\/p>\n<p>\u4f7f\u7528 stringify<\/p>\n<p>var last=JSON.stringify(obj); \/\/\u5c06 JSON \u5bf9\u8c61\u8f6c\u5316\u4e3a JSON \u5b57\u7b26<\/p>\n<p>\u53cd\u5e8f\u5217\u5316 \u5373 js \u4e2d JSON \u5b57\u7b26\u4e32\u8f6c\u5316\u4e3a Object<\/p>\n<h1>\u8f6c\u4e49<\/h1>\n<p>decodeURI( ) URl \u4e2d\u672a\u8f6c\u4e49\u7684\u5b57\u7b26<\/p>\n<p>decodeURIComponent( ) URI \u7ec4\u4ef6\u4e2d\u7684\u672a\u8f6c\u4e49\u5b57\u7b26<\/p>\n<p>encodeURI( ) URI \u4e2d\u7684\u8f6c\u4e49\u5b57\u7b26<\/p>\n<p>encodeURIComponent( ) \u8f6c\u4e49 URI \u7ec4\u4ef6\u4e2d\u7684\u5b57\u7b26<\/p>\n<p>escape( ) \u5bf9\u5b57\u7b26\u4e32\u8f6c\u4e49<\/p>\n<p>unescape( ) \u7ed9\u8f6c\u4e49\u5b57\u7b26\u4e32\u89e3\u7801<\/p>\n<p>URIError \u7531 URl \u7684\u7f16\u7801\u548c\u89e3\u7801\u65b9\u6cd5\u629b\u51fa<\/p>\n<h1>eval<\/h1>\n<p>eval() \u51fd\u6570\u53ef\u8ba1\u7b97\u67d0\u4e2a\u5b57\u7b26\u4e32\uff0c\u5e76\u6267\u884c\u5176\u4e2d\u7684\u7684 JavaScript \u4ee3\u7801\u3002<\/p>\n<h1>\u65f6\u95f4<\/h1>\n<p>Date \u5bf9\u8c61<\/p>\n<p>var myDate = new Date();<\/p>\n<p>myDate.getYear(); \/\/\u83b7\u53d6\u5f53\u524d\u5e74\u4efd(2 \u4f4d)<\/p>\n<p>myDate.getFullYear(); \/\/\u83b7\u53d6\u5b8c\u6574\u7684\u5e74\u4efd(4 \u4f4d,1970-????)<\/p>\n<p>myDate.getMonth(); \/\/ \u83b7 \u53d6 \u5f53 \u524d \u6708 \u4efd (0-11,0 \u4ee3 \u8868 1 \u6708 ) \u6240 \u4ee5 \u83b7 \u53d6 \u5f53 \u524d \u6708 \u4efd \u662f<\/p>\n<p>myDate.getMonth()+1;<\/p>\n<p>myDate.getDate(); \/\/\u83b7\u53d6\u5f53\u524d\u65e5(1-31)<\/p>\n<p>myDate.getDay(); \/\/\u83b7\u53d6\u5f53\u524d\u661f\u671f X(0-6,0 \u4ee3\u8868\u661f\u671f\u5929)<\/p>\n<p>myDate.getTime(); \/\/\u83b7\u53d6\u5f53\u524d\u65f6\u95f4(\u4ece 1970.1.1 \u5f00\u59cb\u7684\u6beb\u79d2\u6570)<\/p>\n<p>myDate.getHours(); \/\/\u83b7\u53d6\u5f53\u524d\u5c0f\u65f6\u6570(0-23)<\/p>\n<p>myDate.getMinutes(); \/\/\u83b7\u53d6\u5f53\u524d\u5206\u949f\u6570(0-59)<\/p>\n<p>myDate.getSeconds(); \/\/\u83b7\u53d6\u5f53\u524d\u79d2\u6570(0-59)<\/p>\n<p>myDate.getMilliseconds(); \/\/\u83b7\u53d6\u5f53\u524d\u6beb\u79d2\u6570(0-999)<\/p>\n<p>myDate.toLocaleDateString(); \/\/\u83b7\u53d6\u5f53\u524d\u65e5\u671f<\/p>\n<p>var mytime = myDate.toLocaleTimeString(); \/\/\u83b7\u53d6\u5f53\u524d\u65f6\u95f4<\/p>\n<p>myDate.toLocaleString( ); \/\/\u83b7\u53d6\u65e5\u671f\u4e0e\u65f6\u95f4<\/p>\n<p>\u52a0\u4e00\u5929<\/p>\n<p>var dateTime = new Date();<\/p>\n<p>dateTime=dateTime.setDate(dateTime.getDate()+1);<\/p>\n<p>dateTime=new Date(dateTime);<\/p>\n<p>dateTime=dateTime.setDate(dateTime.getDate()+1);<\/p>\n<h1>\u9762\u5411\u5bf9\u8c61<\/h1>\n<p>JavaScript \u662f\u4e00\u79cd\u57fa\u4e8e\u539f\u578b\u7684\u8bed\u8a00\uff0c\u5b83\u6ca1\u7c7b\u7684\u58f0\u660e\u8bed\u53e5\uff0c\u6bd4\u5982 C+ +\u6216 Java \u4e2d\u7528<\/p>\n<p>\u7684\u3002\u8fd9\u6709\u65f6\u4f1a\u5bf9\u4e60\u60ef\u4f7f\u7528\u6709\u7c7b\u7533\u660e\u8bed\u53e5\u8bed\u8a00\u7684\u7a0b\u5e8f\u5458\u4ea7\u751f\u56f0\u6270\u3002\u76f8\u53cd\uff0cJavaScript<\/p>\n<p>\u53ef\u7528\u65b9\u6cd5\u4f5c\u7c7b\u3002\u5b9a\u4e49\u4e00\u4e2a\u7c7b\u8ddf\u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570\u4e00\u6837\u7b80\u5355\u3002\u5728\u4e0b\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5b9a<\/p>\n<p>\u4e49\u4e86\u4e00\u4e2a\u65b0\u7c7b Person\u3002<\/p>\n<h2>\u65b9\u6cd5\u4e00<\/h2>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">function Person(name) {\n\/\/\u6784\u9020\u51fd\u6570\u91cc\u9762\u7684\u65b9\u6cd5\u548c\u5c5e\u6027\nthis._name = name;\nthis.getName = function () {\nconsole.log(this._name);\n};\nthis.setName = function (name) {\nthis._name = name;\n};\n}\nvar p = new Person(\"\u5f20\u4e09\");\np.getName(); \/\/ \u5f20\u4e09\np.setName(\"\u674e\u56db\");\np.getName(); \/\/ \u674e\u56db<\/code><\/pre>\n<p>\u5bf9\u4e8e\u4e0a\u8ff0\u4ee3\u7801\u9700\u8981\u6ce8\u610f\uff1a<\/p>\n<p>Person \u5145\u5f53\u7684\u6784\u9020\u51fd\u6570<\/p>\n<p>this \u4ee3\u6307\u5bf9\u8c61<\/p>\n<p>\u521b\u5efa\u5bf9\u8c61\u65f6\u9700\u8981\u4f7f\u7528 new<\/p>\n<h2>\u65b9\u6cd5\u4e8c<\/h2>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">\/\/ \u5b9a\u4e49\u7c7b class Person {\n\/\/\u7c7b\u7684\u6784\u9020\u51fd\u6570\uff0c\u5b9e\u4f8b\u5316\u7684\u65f6\u5019\u6267\u884c\uff0cnew \u7684\u65f6\u5019\u6267\u884c\nconstructor(name) {\nthis._name = name;\n}\ngetName() {\nconsole.log(this._name);\n}\nsetName(name) {\nthis._name = name\n}\n}\nlet p = new Preson('\u5f20\u4e09')\np.getName(); \/\/ \u5f20\u4e09\np.setName('\u674e\u56db');\np.getName(); \/\/ \u674e\u56db<\/code><\/pre>\n<h1>\u539f\u578b<\/h1>\n<p>\u6211\u4eec\u6240\u521b\u5efa\u7684\u6bcf\u4e00\u4e2a\u51fd\u6570\uff0c\u89e3\u6790\u5668\u90fd\u4f1a\u5411\u51fd\u6570\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u5c5e\u6027 prototype<\/p>\n<p>\u8fd9\u4e2a\u5c5e\u6027\u5bf9\u5e94\u7740\u4e00\u4e2a\u5bf9\u8c61\uff0c\u8fd9\u4e2a\u5bf9\u8c61\u5c31\u662f\u6211\u4eec\u6240\u8c13\u7684\u539f\u578b\u5bf9\u8c61<\/p>\n<p>\u5982\u679c\u51fd\u6570\u4f5c\u4e3a\u666e\u901a\u51fd\u6570\u8c03\u7528\u65f6 prototype \u6ca1\u6709\u4efb\u4f55\u4f5c\u7528<\/p>\n<p>\u5f53\u51fd\u6570\u4ee5\u6784\u9020\u51fd\u6570\u8c03\u7528\u65f6\uff0c\u5b83\u6240\u521b\u5efa\u7684\u5bf9\u8c61\u4e2d\u90fd\u4f1a\u6709\u4e00\u4e2a\u9690\u542b\u7684\u7684\u5c5e\u6027<\/p>\n<p>\u6307\u5411\u8be5\u6784\u9020\u51fd\u6570\u7684\u539f\u578b \u6211\u4eec\u53ef\u4ee5\u901a\u8fc7<strong>proto<\/strong>\u6765\u8bbf\u95ee\u8be5\u5c5e\u6027<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u5c06\u5bf9\u8c61\u4e2d\u516c\u6709\u7684\u5185\u5bb9\uff0c\u7edf\u4e00\u8bbe\u7f6e\u5230\u539f\u578b\u5bf9\u8c61\u4e2d<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">function Persion(username,age){\n}\n\/\/console.log(Persion.prototype);\nvar p = new Persion();\nconsole.log(p.__proto__ == Persion.prototype);<\/code><\/pre>\n<p>\u5b9a\u4e49\u539f\u578b\u53d8\u91cf\u548c\u539f\u578b\u53d8\u91cf<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">function Persion(username,age){\n}\n\/\/console.log(Persion.prototype);\nPersion.prototype.a = '\u5973';\nPersion.prototype.Sayname=function(){\nreturn Persion.name;\n}\nvar p1 = new Persion('moonsec');\nvar p2 = new Persion();\nalert(p1.Sayname());<\/code><\/pre>\n<h1>\u8fd0\u7b97\u7b26<\/h1>\n<p>\u7528\u4e8e\u6267\u884c\u7a0b\u5e8f\u4ee3\u7801\u8fd0\u7b97\uff0c\u4f1a\u9488\u5bf9\u4e00\u4e2a\u4ee5\u4e0a\u64cd\u4f5c\u6570\u6765\u8fdb\u884c<\/p>\n<h2>\u7b97\u6570\u8fd0\u7b97\u7b26<\/h2>\n<ul>\n<li>\n<ul>\n<li>\n<ul>\n<li>\/ % ++ &#8212;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u5b57\u7b26\u4e32\u62fc\u63a5\u4f7f\u7528\u201c+\u201d<\/p>\n<h2>\u6bd4\u8f83\u8fd0\u7b97\u7b26<\/h2>\n<p>&lt;<\/p>\n<blockquote><\/blockquote>\n<p>==<\/p>\n<p>\uff01=<\/p>\n<p>&lt;=<\/p>\n<blockquote>\n<p>=<\/p>\n<\/blockquote>\n<p>=== \u5168\u7b49\u4e8e\uff1a\u5c06\u6570\u503c\u4ee5\u53ca\u6570\u636e\u7c7b\u578b\u4e00\u5e76\u6bd4\u8f83<\/p>\n<p>\uff01==\u4e0d\u5168\u7b49\u4e8e\uff1a\u5c06\u6570\u503c\u4ee5\u53ca\u6570\u636e\u7c7b\u578b\u4e00\u5e76\u6bd4\u8f83<\/p>\n<h2>\u8d4b\u503c\u8fd0\u7b97\u7b26<\/h2>\n<p>=<\/p>\n<p>+=<\/p>\n<p>-=<\/p>\n<p>*=<\/p>\n<p>\/=<\/p>\n<p>%=<\/p>\n<p>a=a+2;==&gt;a+=2<\/p>\n<p>a=a-2;==&gt;a-=2<\/p>\n<p>a=a<em>2;==&gt;a<\/em>=2<\/p>\n<p>a=a\/2;==&gt;a\/=2<\/p>\n<p>a=a%2;==&gt;a%=2<\/p>\n<h2>\u903b\u8f91\u8fd0\u7b97\u7b26<\/h2>\n<p>&amp;&amp; \u5168\u771f\u4e3a\u771f<\/p>\n<p>|| \u4e00\u4e2a\u4e3a\u771f\u5c31\u662f\u771f<\/p>\n<p>\uff01 \u53d6\u53cd<\/p>\n<h2>\u4e09\u5143\u8fd0\u7b97\u7b26<\/h2>\n<p>\u8868\u8fbe\u5f0f 1?\u8868\u8fbe\u5f0f 2:\u8868\u8fbe\u5f0f 3<\/p>\n<p>\u5f53\u6211\u7684\u8868\u8fbe\u5f0f 1 \u6210\u7acb\u65f6 \u6267\u884c\u8868\u8fbe\u5f0f 2 \u5426\u5219\u6267\u884c\u8868\u8fbe\u5f0f 3<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">var max = 2&gt;1?'&gt;':'&lt;';\nconsole.log(max);<\/code><\/pre>\n<h1>\u6d41\u7a0b\u63a7\u5236\u8bed\u53e5<\/h1>\n<h2>if\u8bed\u53e5<\/h2>\n<p>if(\u6761\u4ef6){<\/p>\n<p>\u51fd\u6570\u4f53<\/p>\n<p>}<\/p>\n<h2>if else\u8bed\u53e5<\/h2>\n<p>if(\u6761\u4ef6){<\/p>\n<p>\u51fd\u6570\u4f53 1<\/p>\n<p>}else{<\/p>\n<p>\u51fd\u6570\u4f53 2<\/p>\n<p>}<\/p>\n<h2>if else if else \u8bed\u53e5<\/h2>\n<p>if(\u6761\u4ef6 1){<\/p>\n<p>}else if(\u6761\u4ef6 2){<\/p>\n<p>}else if(\u6761\u4ef6 n){<\/p>\n<p>}else{<\/p>\n<p>}<\/p>\n<h2>switch\u8bed\u53e5<\/h2>\n<p>switch(\u8868\u8fbe\u5f0f) {<\/p>\n<p>case n:<\/p>\n<p>\u4ee3\u7801\u5757<\/p>\n<p>break;<\/p>\n<p>case n:<\/p>\n<p>\u4ee3\u7801\u5757<\/p>\n<p>break;<\/p>\n<p>default:<\/p>\n<p>\u9ed8\u8ba4\u4ee3\u7801\u5757<\/p>\n<p>}<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">switch (new Date().getDay()) {\ncase 6:\ntext = \"\u4eca\u5929\u662f\u5468\u516d\";\nbreak;\ncase 0:\ntext = \"\u4eca\u5929\u662f\u5468\u65e5\";\nbreak;\ndefault:\ntext = \"\u671f\u5f85\u5468\u672b~\";\n}<\/code><\/pre>\n<h1>\u5faa\u73af\u7ed3\u6784<\/h1>\n<h2>while \u5faa\u73af<\/h2>\n<p>\u5148\u5224\u65ad\u6761\u4ef6 \u5f53\u6761\u4ef6\u6210\u7acb \u518d\u6267\u884c<\/p>\n<p>while(\u5faa\u73af\u6210\u7acb\u6761\u4ef6){<\/p>\n<p>&#8230;.<\/p>\n<p>}<\/p>\n<h2>do while\u5faa\u73af<\/h2>\n<p>do&#8230;while \u5faa\u73af:\u4e0d\u8bba\u6761\u4ef6\u6210\u4e0d\u6210\u7acb \u5148\u6267\u884c\u4e00\u904d \u518d\u5224\u65ad<\/p>\n<p>do{<\/p>\n<p>&#8230;..<\/p>\n<p>}while(\u5faa\u73af\u6210\u7acb\u6761\u4ef6)<\/p>\n<h2>for\u5faa\u73af<\/h2>\n<h2>for in\u5faa\u73af<\/h2>\n<p>continue\uff1a<\/p>\n<p>\u8df3\u8fc7\u5f53\u524d\u5faa\u73af\uff0c\u76f4\u63a5\u8fdb\u5165\u5faa\u73af\u7684\u4e0b\u4e00\u4e2a\u6b65\u9aa4<\/p>\n<p>break:<\/p>\n<p>\u7ed3\u675f\u5faa\u73af<\/p>\n<h1>JS\u64cd\u4f5cDOM<\/h1>\n<h2>\u4ec0\u4e48\u662fDOM<\/h2>\n<p>\u5728JavaScript\u4e2d\uff0cDOM\uff08Document Object Model\uff09\u662fHTML\u548cXML\u6587\u6863\u7684\u7f16\u7a0b\u63a5\u53e3\u3002\u5b83\u5c06\u6574\u4e2a\u9875\u9762\u8868\u793a\u4e3a\u4e00\u4e2a\u6811\u5f62\u7ed3\u6784\uff0c\u5176\u4e2d\u6bcf\u4e2a\u8282\u70b9\u90fd\u662f\u4e00\u4e2a\u5bf9\u8c61\uff0c\u4ee3\u8868\u6587\u6863\u4e2d\u7684\u4e00\u4e2a\u90e8\u5206\uff0c\u5982\u5143\u7d20\u3001\u5c5e\u6027\u6216\u6587\u672c\u7b49\u3002\u4e0b\u9762\u6211\u5c06\u4ee5\u4e00\u4e2a\u7b80\u5355\u7684HTML\u6587\u6863\u4e3a\u4f8b\uff0c\u7ed8\u5236\u5176\u5bf9\u5e94\u7684DOM\u7ed3\u6784\u56fe\uff0c\u5e76\u9644\u4e0a\u8be6\u7ec6\u7684\u6ce8\u91ca\u8bf4\u660e\u3002<\/p>\n<h3>HTML \u793a\u4f8b<\/h3>\n<pre class=\"prettyprint linenums\" ><code class=\"language-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;title&gt;Sample Page&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;h1&gt;Welcome to My Website&lt;\/h1&gt;\n    &lt;p id=\"intro\"&gt;This is a simple web page.&lt;\/p&gt;\n    &lt;div class=\"content\"&gt;\n        &lt;p&gt;Here is some more information.&lt;\/p&gt;\n        &lt;ul&gt;\n            &lt;li&gt;Item 1&lt;\/li&gt;\n            &lt;li&gt;Item 2&lt;\/li&gt;\n            &lt;li&gt;Item 3&lt;\/li&gt;\n        &lt;\/ul&gt;\n    &lt;\/div&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n<h3>DOM \u7ed3\u6784\u56fe<\/h3>\n<pre class=\"prettyprint linenums\" ><code class=\"language-plain\">Document (\u6839\u8282\u70b9)\n\u2502\n\u251c\u2500\u2500 doctype (\u6587\u6863\u7c7b\u578b\u58f0\u660e)\n\u2502\n\u2514\u2500\u2500 html (HTML\u6587\u6863\u7684\u6839\u5143\u7d20)\n    \u251c\u2500\u2500 head\n    \u2502   \u2514\u2500\u2500 title\n    \u2502       \u2514\u2500\u2500 \"Sample Page\" (\u6587\u672c\u8282\u70b9)\n    \u2502\n    \u2514\u2500\u2500 body\n        \u251c\u2500\u2500 h1\n        \u2502   \u2514\u2500\u2500 \"Welcome to My Website\" (\u6587\u672c\u8282\u70b9)\n        \u2502\n        \u251c\u2500\u2500 p (id=\"intro\")\n        \u2502   \u2514\u2500\u2500 \"This is a simple web page.\" (\u6587\u672c\u8282\u70b9)\n        \u2502\n        \u2514\u2500\u2500 div (class=\"content\")\n            \u251c\u2500\u2500 p\n            \u2502   \u2514\u2500\u2500 \"Here is some more information.\" (\u6587\u672c\u8282\u70b9)\n            \u2502\n            \u2514\u2500\u2500 ul\n                \u251c\u2500\u2500 li\n                \u2502   \u2514\u2500\u2500 \"Item 1\" (\u6587\u672c\u8282\u70b9)\n                \u2502\n                \u251c\u2500\u2500 li\n                \u2502   \u2514\u2500\u2500 \"Item 2\" (\u6587\u672c\u8282\u70b9)\n                \u2502\n                \u2514\u2500\u2500 li\n                    \u2514\u2500\u2500 \"Item 3\" (\u6587\u672c\u8282\u70b9)<\/code><\/pre>\n<h3>\u6ce8\u91ca\u89e3\u91ca<\/h3>\n<ul>\n<li><strong>Document<\/strong>\uff1a\u8fd9\u662fDOM\u6811\u7684\u6700\u9876\u5c42\u8282\u70b9\uff0c\u4ee3\u8868\u4e86\u6574\u4e2a\u6587\u6863\u3002<\/li>\n<li><strong>doctype<\/strong>\uff1a\u63cf\u8ff0\u4e86\u6587\u6863\u9075\u5faa\u7684DTD\uff08\u6587\u6863\u7c7b\u578b\u5b9a\u4e49\uff09\uff0c\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\u6307\u5b9a\u4e86\u8fd9\u662f\u4e00\u4e2aHTML5\u6587\u6863\u3002<\/li>\n<li><strong>html<\/strong>\uff1aHTML\u6587\u6863\u7684\u5b9e\u9645\u6839\u5143\u7d20\u3002<\/li>\n<li><strong>head<\/strong> \u548c <strong>body<\/strong>\uff1a<code>&lt;html&gt;<\/code> \u7684\u4e24\u4e2a\u76f4\u63a5\u5b50\u5143\u7d20\uff0c\u5206\u522b\u5305\u542b\u5934\u90e8\u4fe1\u606f\u548c\u4e3b\u4f53\u5185\u5bb9\u3002<\/li>\n<li><strong>title<\/strong>\uff1a\u4f4d\u4e8e<code>&lt;head&gt;<\/code>\u5185\u90e8\uff0c\u7528\u6765\u8bbe\u7f6e\u7f51\u9875\u6807\u9898\u3002<\/li>\n<li><strong>h1, p, div, ul, li<\/strong> \u7b49\u6807\u7b7e\u90fd\u5bf9\u5e94\u7740DOM\u4e2d\u7684\u5143\u7d20\u8282\u70b9\u3002\u6bcf\u4e2a\u8fd9\u6837\u7684\u8282\u70b9\u90fd\u53ef\u4ee5\u901a\u8fc7JavaScript\u6765\u8bbf\u95ee\u548c\u4fee\u6539\u3002<\/li>\n<li><strong>\u6587\u672c\u8282\u70b9<\/strong>\uff1a\u8fd9\u4e9b\u8282\u70b9\u5305\u542b\u4e86\u5b9e\u9645\u53ef\u89c1\u7684\u6587\u5b57\u5185\u5bb9\u3002\u4f8b\u5982\uff0c\u5728<code>&lt;h1&gt;<\/code>\u4e0b\u7684\u201cWelcome to My Website\u201d\u5c31\u662f\u4e00\u4e2a\u6587\u672c\u8282\u70b9\u3002<\/li>\n<li><strong>\u5c5e\u6027<\/strong>\uff1a\u867d\u7136\u6ca1\u6709\u5728\u4e0a\u8ff0\u7ed3\u6784\u56fe\u4e2d\u660e\u786e\u6807\u51fa\uff0c\u4f46\u50cf<code>id=\"intro\"<\/code>\u8fd9\u6837\u7684\u5c5e\u6027\u4e5f\u53ef\u4ee5\u4f5c\u4e3a\u7279\u5b9a\u5143\u7d20\u8282\u70b9\u7684\u4e00\u90e8\u5206\u88ab\u8bbf\u95ee\u5230\u3002<br \/>\n\u6b64\u56fe\u5c55\u793a\u4e86\u5982\u4f55\u4eceHTML\u8f6c\u6362\u6210DOM\u6811\uff0c\u5e76\u4e14\u6bcf\u79cd\u7c7b\u578b\u7684\u8282\u70b9\u5982\u4f55\u7ec4\u7ec7\u5728\u4e00\u8d77\u5f62\u6210\u5b8c\u6574\u7684\u7f51\u9875\u7ed3\u6784\u3002\u901a\u8fc7JavaScript\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u64cd\u4f5c\u8fd9\u4e9b\u8282\u70b9\u4ee5\u5b9e\u73b0\u52a8\u6001\u66f4\u65b0\u9875\u9762\u7684\u6548\u679c\u3002<\/li>\n<\/ul>\n<p>JavaScript \u80fd\u591f\u6539\u53d8\u9875\u9762\u4e2d\u7684\u6240\u6709 HTML \u5143\u7d20<\/p>\n<p>JavaScript \u80fd\u591f\u6539\u53d8\u9875\u9762\u4e2d\u7684\u6240\u6709 HTML \u5c5e\u6027<\/p>\n<p>JavaScript \u80fd\u591f\u6539\u53d8\u9875\u9762\u4e2d\u7684\u6240\u6709 CSS \u6837\u5f0f<\/p>\n<p>JavaScript \u80fd\u591f\u5bf9\u9875\u9762\u4e2d\u7684\u6240\u6709\u4e8b\u4ef6\u505a\u51fa\u53cd\u5e94<\/p>\n<h2>DOM\u67e5\u627e\u5143\u7d20<\/h2>\n<p>document \u83b7\u53d6\u8282\u70b9\u7684\u57fa\u672c\u65b9\u6cd5<\/p>\n<p>document.getElementById(&#8216;id&#8217;); \/\/\u901a\u8fc7 id \u6765\u83b7\u53d6\u5143\u7d20,\u8fd4\u56de\u6307\u5b9a\u7684\u552f\u4e00\u5143\u7d20\u3002<\/p>\n<p>document.getElementsByName(&quot;name&quot;); \/\/\u901a\u8fc7 name \u6765\u83b7\u53d6\u5143\u7d20\uff0c\u8fd4\u56de<\/p>\n<p>name=&#8217;name&#8217;\u7684\u96c6\u5408\u3002<\/p>\n<p>.document.getElementsByClassName(&quot;classname&quot;) \/\/\u7528 classname \u6765\u83b7\u53d6\u5143\u7d20\uff0c\u8fd4<\/p>\n<p>\u56de\u7684\u662f\u4e00\u4e2a class=&quot;classname&quot;\u7684\u96c6\u5408(\u4e0d\u517c\u5bb9 IE8 \u53ca\u4ee5\u4e0b)\u3002<\/p>\n<p>document.getElementsByTagName(&#8216;div&#8217;); \/\/\u7528\u5143\u7d20\u7684\u6807\u7b7e\u83b7\u53d6\u5143\u7d20\uff0c\u8fd4\u56de\u6240\u6709\u6807\u7b7e<\/p>\n<p>=\u201cdiv\u201d\u7684\u96c6\u5408\u3002<\/p>\n<h3>\u67e5\u627e<\/h3>\n<p>\u76f4\u63a5\u67e5\u627e<\/p>\n<p>var obj = document.getElementById(&#8216;id&#8217;);<\/p>\n<p>\u95f4\u63a5\u67e5\u627e<\/p>\n<p>\u6587\u4ef6\u5185\u5bb9\u64cd\u4f5c<\/p>\n<p>innerText \u4ec5\u6587\u672c<\/p>\n<p>innerHTML \u5168\u5185\u5bb9<\/p>\n<p>value<\/p>\n<p>input value \u83b7\u53d6\u5f53\u524d\u7684\u503c<\/p>\n<p>select \u83b7\u53d6\u9009\u4e2d\u7684 value \u7684\u503c<\/p>\n<p>document.getElementById(&#8216;s1&#8217;).selectedIndex=1<\/p>\n<p>Textarea \u83b7\u53d6 value \u7684\u503c<\/p>\n<h3>\u64cd\u4f5c<\/h3>\n<p>\u6837\u5f0f\u64cd\u4f5c<\/p>\n<p>className \u5217\u51fa\u6837\u5f0f \u5b57\u7b26\u4e32<\/p>\n<p>classList \u5217\u51fa\u6837\u5f0f \u8fd4\u56de\u6570\u7ec4<\/p>\n<p>classList.add \u589e\u52a0\u6837\u5f0f<\/p>\n<p>classList.remove \u5220\u9664\u6837\u5f0f<\/p>\n<div class='c1 c2' styple='font-size:16px'><\/div>\n<p>obj.style.fontSize=&#8217;16px&#8217;;<\/p>\n<p>\u5c5e\u6027\u64cd\u4f5c<\/p>\n<p>\u83b7\u53d6\u5c5e\u6027<\/p>\n<p>getAttribute()<\/p>\n<p>\u589e\u52a0\u8bbe\u7f6e\u4e00\u4e2a\u5c5e\u6027<\/p>\n<p>\u6dfb\u52a0\u5c5e\u6027<\/p>\n<p>setAttribute(&#8216;xxx&#8217;,&#8217;alexe&#8217;)<\/p>\n<p>\u5220\u9664\u5c5e\u6027<\/p>\n<p>removeAttribute(value)<\/p>\n<p>\u521b\u5efa\u6807\u7b7e \u5e76\u6dfb\u52a0\u5230 html \u4e2d<\/p>\n<p>\u7b2c\u4e00\u79cd\u65b9\u5f0f \u5b57\u7b26\u4e32\u65b9\u5f0f<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">insertAdjacentHTML()\n&lt;input type=\"button\" value=\"+\" onclick=\"add();\"\/&gt;\n&lt;div id=\"div1\"&gt;\n&lt;p&gt;&lt;input type=\"text\"\/&gt;&lt;\/p&gt;\n&lt;\/div&gt;\n&lt;script&gt;\nfunction add(){\nvar tag=\"&lt;p&gt;&lt;input type='text'&gt;&lt;\/p&gt;\"\ndocument.getElementById('div1').insertAdjacentHTML('beforeEnd'\n,tag);\n}\n&lt;\/script&gt;\n&lt;\/body&gt;<\/code><\/pre>\n<p>\u6709\u56db\u79cd\u503c\u53ef\u7528\uff1a<\/p>\n<p>beforeBegin: \u63d2\u5165\u5230\u6807\u7b7e\u5f00\u59cb\u524d<\/p>\n<p>afterBegin:\u63d2\u5165\u5230\u6807\u7b7e\u5f00\u59cb\u6807\u8bb0\u4e4b\u540e<\/p>\n<p>beforeEnd:\u63d2\u5165\u5230\u6807\u7b7e\u7ed3\u675f\u6807\u8bb0\u524d<\/p>\n<p>afterEnd:\u63d2\u5165\u5230\u6807\u7b7e\u7ed3\u675f\u6807\u8bb0\u540e<\/p>\n<p>\u7b2c\u4e8c\u79cd\u65b9\u5f0f \u5bf9\u8c61\u7684\u65b9\u5f0f<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">document.createElement\n&lt;input type=\"button\" value=\"+\" onclick=\"add2();\"\/&gt;\n&lt;div id=\"div1\"&gt;\n&lt;p&gt;&lt;input type=\"text\"\/&gt;&lt;\/p&gt;\n&lt;\/div&gt;\n&lt;script&gt;\nfunction add(){\nvar tag=\"&lt;p&gt;&lt;input type='text'&gt;&lt;\/p&gt;\"\ndocument.getElementById('div1').insertAdjacentHTML('beforeEnd'\n,tag);\n}\nfunction add2(){\nvar tag =document.createElement('input');\ntag.setAttribute('type','text');\ntag.style.color='red';\nvar p =document.createElement('p');\np.appendChild(tag)\ndocument.getElementById('div1').appendChild(p);\n}\n&lt;\/script&gt;appendChild \u5728\u8282\u70b9\u540e\u9762\u589e\u52a0\u4e00\u4e2a\u5b50\u8282\u70b9<\/code><\/pre>\n<p>\u63d0\u4ea4\u8868\u5355<\/p>\n<p>\u4efb\u4f55\u6807\u7b7e\u90fd\u53ef\u4ee5\u901a\u8fc7 dom \u63d0\u4ea4<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">getElementById('id').submit()\n&lt;form id='f1' action=\"https:\/\/www.moonsec.com\/\"&gt;\n&lt;input type=\"submit\" value=\"\u63d0\u4ea4\" \/&gt;\n&lt;input type=\"button\" value=\"botton\" onclick=\"Sub();\"\n\/&gt;\n&lt;a onclick=\"Sub();\"&gt;\u63d0\u4ea4&lt;\/a&gt;\n&lt;\/form&gt;\n&lt;script&gt;\nfunction Sub(){\ndocument.getElementById('f1').submit();\n}\n&lt;\/script&gt;<\/code><\/pre>\n<p>\u5176\u4ed6<\/p>\n<p>console.log \u7ec8\u7aef\u8f93\u51fa<\/p>\n<p>alert \u5f39\u51fa\u6846<\/p>\n<p>confirm \u786e\u8ba4\u6846 \u6807\u9898 true false<\/p>\n<p>url \u548c\u5237\u65b0<\/p>\n<p>location.href \u83b7\u53d6 url<\/p>\n<p>location.href =&#8217;url&#8217; \u91cd\u5b9a\u5411<\/p>\n<p>location.reload() \u91cd\u65b0\u52a0\u8f7d<\/p>\n<p>\u5b9a\u65f6\u5668<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">setInterval()\nclearInterval()\n&lt;input id=\"i1\" type=\"text\" \/&gt;\n&lt;input type=\"button\" value=\"\u505c\u6b62\" onclick=\"stop();\"&gt;\n&lt;script&gt;\nfunction setTime(){\nvar tag = new Date();\ndocument.getElementById('i1').value=tag;\n}\nvar obj=setInterval('setTime()','500');\nfunction stop(){\nclearInterval(obj);\n}<\/code><\/pre>\n<p>\u53ea\u6267\u884c\u4e00\u6b21<\/p>\n<pre class=\"prettyprint linenums\" ><code class=\"language-sql\">setTimeout()\nclearTimeout()\n&lt;div id=\"status\"&gt;&lt;\/div&gt;\n&lt;input type=\"button\" value=\"\u5220\u9664\" onclick=\"Delele();\"&gt;\n&lt;script&gt;\nfunction Delele(){\ndocument.getElementById('status').innerText=\"\u5df2\u5220\u9664\";\nsetTimeout(function(){\ndocument.getElementById('status').innerText=\"\";\n},5000)\n}\n&lt;\/script&gt;<\/code><\/pre>\n<p>\u4e8b\u4ef6<\/p>\n<p>\u7ed1\u5b9a\u4e8b\u4ef6\u4e24\u79cd\u65b9\u5f0f<\/p>\n<p>a.\u76f4\u63a5\u6807\u7b7e\u7ed1\u5b9a \u76f4\u63a5\u6807\u7b7e\u7ed1\u5b9a onclick=&#8221;<\/p>\n<p>\u5148\u83b7\u53d6 dom \u5bf9\u8c61\uff0c\u7136\u540e\u8fdb\u884c\u7ed1\u5b9a<\/p>\n<p>document.getElementById(&#8216;xxx&#8217;).onclick()<\/p>\n<blockquote>\n<p>\u66f4\u65b0: 2025-04-23 10:51:11<br \/>\n\u539f\u6587: <a href=\"https:\/\/www.yuque.com\/yuhui.net\/network\/fdkif7310oxy0lkv\">https:\/\/www.yuque.com\/yuhui.net\/network\/fdkif7310oxy0lkv<\/a><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript\u57fa\u7840 \u6982\u8ff0 avaScript \u88ab\u7528\u6765\u6539\u8fdb\u8bbe\u8ba1\u3001\u9a8c\u8bc1\u8868\u5355\u3001\u68c0\u6d4b\u6d4f\u89c8\u5668\u3001\u521b\u5efa cookies\uff0c\u7b49\u7b49 \u3002 JavaScript \u662f\u56e0\u7279\u7f51\u4e0a\u6700\u6d41\u884c\u7684\u811a\u672c\u8bed\u8a00\uff0c\u5e76\u4e14\u53ef\u5728\u6240\u6709\u4e3b\u8981\u7684\u6d4f\u89c8\u5668\u4e2d\u8fd0\u884c\uff0c \u6bd4\u5982\uff1a Internet Explorer\u3001Maxthon\u3001Mozilla\u3001Firefox\u3001Netscape\u3001Chrome \u548c Opera\u7b49\u3002 \u5e38\u7528 1 \u4fee\u6539 html \u53ca css \u4ee3\u7801 \uff082\uff09 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124,119,2],"tags":[29,84],"class_list":["post-801","post","type-post","status-publish","format-standard","hentry","category-qianzhizhishi","category-shentouceshijichu-network_sec","category-network_sec","tag-java","tag-shutong"],"_links":{"self":[{"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/posts\/801","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/comments?post=801"}],"version-history":[{"count":0,"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/posts\/801\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/media?parent=801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/categories?post=801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youvii.site\/index.php\/wp-json\/wp\/v2\/tags?post=801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}