{"id":56080,"date":"2025-08-14T12:24:34","date_gmt":"2025-08-14T04:24:34","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/56080.html"},"modified":"2025-08-14T12:24:34","modified_gmt":"2025-08-14T04:24:34","slug":"8-13-js%e6%95%b0%e6%8d%ae%e7%b1%bb%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/56080.html","title":{"rendered":"8.13 JS\u6570\u636e\u7c7b\u578b"},"content":{"rendered":"<h4>\u4ec0\u4e48\u662f\u53d8\u91cf&#xff1f;<\/h4>\n<p>\u89e3\u91ca&#xff1a;\u53ef\u4ee5\u53d8\u5316\u7684\u91cf<\/p>\n<p>\u53d8\u91cf\u662f\u7528\u4e8e\u5b58\u50a8\u4fe1\u606f\u7684\u5bb9\u5668\u3010\u5185\u5b58\u7a7a\u95f4\u3011 \u53d8\u91cf\u662f\u4e00\u6bb5\u547d\u540d\u7684\u5b58\u50a8\u7a7a\u95f4 \u53d8\u91cf\u662f\u5728\u7a0b\u5e8f\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u503c\u5141\u8bb8\u6539\u53d8\u53d8\u91cf\u7684\u503c \u53d8\u91cf\u662f\u7531\u53d8\u91cf\u540d&#xff0c;\u53d8\u91cf\u503c&#xff0c;\u548c\u53d8\u91cf\u7c7b\u578b\u7ec4\u6210&#xff0c;\u8fd0\u7b97\u7b26<\/p>\n<h4>\u53d8\u91cf\u547d\u540d\u89c4\u5219<\/h4>\n<p>\u7b2c\u4e00\u4e2a\u5b57\u7b26\u5fc5\u987b\u4e3a\u5b57\u6bcd&#xff0c;_\u6216$&#xff0c;\u5176\u540e\u7684\u5b57\u7b26\u8fd8\u53ef\u4ee5\u662f\u6570\u5b57 \u4e25\u683c\u533a\u5206\u5927\u5c0f\u5199&#xff0c;\u8981\u6709\u4e00\u5b9a\u7684\u542b\u4e49 \u5efa\u8bae\u4f7f\u7528\u5c0f\u9a7c\u5cf0\u89c4\u5219\u6765\u547d\u540d\u53d8\u91cf\u3002redApple \u4e0d\u80fd\u4f7f\u7528\u5173\u952e\u8bcd&#xff0c;\u4fdd\u7559\u5b57\u4f5c\u4e3a\u53d8\u91cf\u540d<\/p>\n<h4>\u53d8\u91cf\u7684\u547d\u540d\u548c\u8d4b\u503c<\/h4>\n<p>var \u53d8\u91cf\u540d<br \/>\n\u53d8\u91cf\u540d&#061;\u503c<\/p>\n<p>var \u53d8\u91cf\u540d&#061;\u503c<\/p>\n<p>\u53d8\u91cf\u540d&#061;\u503c<\/p>\n<p>var \u53d8\u91cf1&#061;\u503c1&#xff0c;\u53d8\u91cf2&#061;\u503c2&#xff0c;\u53d8\u91cf3&#061;\u503c3<br \/>\n\u6ce8\u610f&#xff1a;<\/p>\n<ul>\n<li>\u53d8\u91cf\u540d\u662f\u6d4f\u89c8\u5668\u5173\u95ed\u540e\u624d\u91ca\u653e\u5728&#xff0c;\u5728\u6ca1\u5173\u95ed\u4e4b\u524d\u968f\u65f6\u4f7f\u7528<\/li>\n<li>\u91cd\u65b0\u58f0\u660e\u7684\u53d8\u91cf&#xff0c;\u4e0d\u4f1a\u4e22\u5931\u539f\u59cb\u503c&#xff0c;\u9664\u975e\u91cd\u65b0\u8d4b\u503c<\/li>\n<li>\u6362\u884c\u662f\u8bed\u53e5\u7684\u7ed3\u675f&#xff0c;\u6700\u597d\u7ed3\u675f\u65f6\u90fd\u52a0\u4e0a &#xff1b;<\/li>\n<li>\u53d8\u91cf\u540d\u662f\u533a\u5206\u5927\u5c0f\u5199\u7684<\/li>\n<\/ul>\n<h4>JavaScript\u7684\u6570\u636e\u7c7b\u578b<\/h4>\n<p>\u5206\u4e3a\u4e24\u79cd&#xff1a;\u539f\u59cb\u7c7b\u578b&#xff08;\u5373\u57fa\u672c\u6570\u636e\u7c7b\u578b&#xff09;\u548c\u5bf9\u8c61\u7c7b\u578b&#xff08;\u5373\u5f15\u7528\u6570\u636e\u7c7b\u578b&#xff09;&#xff1b;<br \/>\njs\u5e38\u7528\u7684\u57fa\u672c\u6570\u636e\u7c7b\u578b\u5305\u62ec<br \/>\nundefined &#8211; &#8211; (\u672a\u5b9a\u4e49)\u3001null- &#8211; (\u7a7a\u7684)\u3001number &#8211; &#8211; (\u6570\u5b57)\u3001boolean- &#8211; (\u5e03\u5c14\u503c)\u3001string- &#8211; (\u5b57\u7b26\u4e32)<br \/>\njs\u7684\u5f15\u7528\u6570\u636e\u7c7b\u578b\u4e5f\u5c31\u662f<\/p>\n<p>\u5bf9\u8c61\u7c7b\u578bObject- &#8211; (\u5bf9\u8c61)&#xff0c;\u6bd4\u5982&#xff1a;array &#8211; &#8211; &#xff08;\u6570\u7ec4&#xff09;\u3001function &#8211; &#8211; &#xff08;\u51fd\u6570&#xff09;\u3001data &#8211; &#8211; &#xff08;\u65f6\u95f4&#xff09;\u7b49&#xff1b;<\/p>\n<p>JS\u4e3a\u5f31\u7c7b\u578b\u8bed\u8a00&#xff0c;\u4e0d\u5fc5\u58f0\u660e\u6570\u636e\u7c7b\u578b&#xff0c;\u800c\u662f\u5728\u4f7f\u7528\u6216\u8d4b\u503c\u7684\u65f6\u5019\u786e\u5b9a\u5176\u7c7b\u578b \u57fa\u672c\u6570\u636e\u7c7b\u578b\u5b58\u653e\u5728\u6808\u4e2d \u5f15\u7528\u6570\u636e\u7c7b\u578b\u5b58\u653e\u5728\u5806\u4e2d\u3010\u8bb2\u5b8c\u7c7b\u578b\u540e\u9762\u8be6\u7ec6\u8bf4\u5806\u548c\u6808\u3011<\/p>\n<h5>\u5f3a\u7c7b\u578b\u8bed\u8a00\/\u5f31\u7c7b\u578b\u8bed\u8a00<\/h5>\n<p>\u5f3a\u7c7b\u578b\u8bed\u8a00\u3010java\u3011&#xff1a;<\/p>\n<ul>\n<li>\u8981\u6c42\u53d8\u91cf\u7684\u4f7f\u7528\u8981\u4e25\u683c\u7b26\u5408\u5b9a\u4e49&#xff0c;\u6240\u6709\u53d8\u91cf\u90fd\u5fc5\u987b\u5148\u5b9a\u4e49\u540e\u4f7f\u7528\u3002<\/li>\n<li>\u4e00\u65e6\u4e00\u4e2a\u53d8\u91cf\u88ab\u6307\u5b9a\u4e86\u67d0\u4e2a\u6570\u636e\u7c7b\u578b&#xff0c;\u5982\u679c\u4e0d\u7ecf\u8fc7\u5f3a\u5236\u8f6c\u6362&#xff0c;\u90a3\u4e48\u5b83\u5c31\u6c38\u8fdc\u662f\u8fd9\u4e2a\u6570\u636e\u7c7b\u578b\u4e86<br \/>\n\u5f31\u7c7b\u578b\u8bed\u8a00\u3010js\/python\/php\u3011&#xff1a;<\/li>\n<li>\u5b83\u4e0e\u5f3a\u7c7b\u578b\u5b9a\u4e49\u8bed\u8a00\u76f8\u53cd, \u4e00\u4e2a\u53d8\u91cf\u53ef\u4ee5\u8d4b\u4e0d\u540c\u6570\u636e\u7c7b\u578b\u7684\u503c<\/li>\n<\/ul>\n<h5>\u5bf9\u8c61\u7c7b\u578b<\/h5>\n<ul>\n<li>\u672c\u5730\u5bf9\u8c61&#xff1a;string&#xff0c;Array&#xff0c;Date&#xff0c;Math&#xff0c;Golbal&#xff0c;\u72ec\u7acb\u4e8e\u5bbf\u4e3b\u73af\u5883\u7684ECMAScript\u5b9e\u73b0\u63d0\u4f9b\u7684\u5bf9\u8c61<\/li>\n<li>\u5bbf\u4e3b\u5bf9\u8c61&#xff1a;DOM&#xff0c;BOM\u3002ECMAScript\u4e2d\u7684\u2018\u5bbf\u4e3b\u2019\u5c31\u662f\u6211\u4eec\u7f51\u9875\u7684\u8fd0\u884c\u73af\u5883&#xff0c;\u5373\u2018\u64cd\u4f5c\u7cfb\u7edf\u2019\u548c\u2018\u6d4f\u89c8\u5668\u2019<\/li>\n<\/ul>\n<h5>\u5224\u65ad\u6570\u636e\u7c7b\u578b<\/h5>\n<p>\u53ef\u4ee5\u901a\u8fc7typeof\u8fd0\u7b97\u7b26\u6765\u5224\u65ad\u6570\u636e\u7c7b\u578b<\/p>\n<h3>String\u7c7b\u578b\u3010\u91cd\u8981\u3011<\/h3>\n<p>js\u4e2d\u7528\u6765\u8868\u8ff0\u6587\u672c\u7684\u6570\u636e\u7c7b\u578b<\/p>\n<li>\u5b57\u7b26\u4e32\u7528\u5355\u5f15\u53f7\u6216\u53cc\u5f15\u53f7\u5305\u62ec\u8d77\u6765<\/li>\n<li>\u5355\u53cc\u5f15\u53f7\u5747\u4e0d\u80fd\u89e3\u6790\u53d8\u91cf<\/li>\n<li>\u53d8\u91cf\u4e0e\u5b57\u7b26\u4e32&#xff0c;\u53d8\u91cf\u4e0e\u53d8\u91cf\u4e4b\u95f4\u53ef\u4ee5\u4f7f\u7528\u8fd0\u7b97\u7b26\u2018&#043;\u2019\u6765\u94fe\u63a5<\/li>\n<li>\u5355\u5f15\u53f7\u548c\u53cc\u5f15\u53f7\u53ef\u4ee5\u4e92\u76f8\u5d4c\u5957&#xff0c;\u5982\u679c\u5355\u5f15\u53f7\u4e2d\u8981\u5d4c\u5957\u5355\u5f15\u53f7&#xff0c;\u9700\u8981\u4f7f\u7528\u8f6c\u4e49\u5b57\u7b26<br \/>\n![[b422d0f9-e960-4608-aa9a-754a5c86079e.png]]<br \/>\n\u6ce8\u610f&#xff1a;<\/li>\n<p>\\\\n\u6362\u884c&#xff08;\u5728alert\u4e2d\u751f\u6548&#xff09;<\/p>\n<p>8\u8fdb\u5236\u8868\u793a\u6cd5\u3010\u8fdb\u884c\u4e24\u6b21\u8f6c\u6362&#xff0c;\u8fd9\u91cc\u9762\u7684\u6570\u5b57\u662fASCII\u4e2d\u8868\u793a\u7684\u516b\u8fdb\u5236\u6570\u5b57\u3011<\/p>\n<p>16\u8fdb\u5236\u8868\u793a\u6cd5<\/p>\n<p>16\u8fdb\u5236unicode\u8868\u793a\u6cd5<\/p>\n<p>console.log(&#039;\\\\062&#039;) \/\/\u516b\u8fdb\u523650  \u5bf9\u5e94\u7684\u503c&#xff1a;2<\/p>\n<h3>Number<\/h3>\n<p>\u6309\u7167\u8fdb\u5236\u5212\u5206&#xff1a;\u4e8c\u8fdb\u5236\u3001\u516b\u8fdb\u5236\u3001\u5341\u8fdb\u5236\u3001\u5341\u516d\u8fdb\u5236<br \/>\n\u6309\u7167\u5176\u4ed6\u5212\u5206&#xff1a;\u6574\u5f62\u3001\u6d6e\u70b9\u578b\u3001NaN&#xff08;not a number&#xff09;<br \/>\njs\u4e2d\u6240\u6709\u7684\u6570\u5b57\u662f\u4ee5IEEE-75\u6807\u51c6\u683c\u5f0f\u8868\u793a\u7684&#xff0c;\u6d6e\u70b9\u6570\u7684\u7cbe\u786e\u95ee\u9898\u4e0d\u662fjs\u7279\u6709\u7684&#xff1b;<br \/>\n\u56e0\u4e3a\u6709\u70b9\u5c0f\u6811\u4ee5\u4e8c\u8fdb\u5236\u8868\u793a\u4f4d\u6570\u662f\u65e0\u7a77\u7684<br \/>\n\u6574\u5f62&#xff1a; 0&#xff0c;6&#xff0c;-100&#xff0c;0xff00&#xff08;\u5341\u516d\u8fdb\u5236&#xff09;&#xff0c;0377\/0o77&#xff08;\u516b\u8fdb\u5236&#xff09;&#xff0c;0b1010&#xff08;\u4e8c\u8fdb\u5236&#xff09;&#xff0c;\u4e0d\u7ba1\u8f93\u5165\u7684\u662f\u51e0\u8fdb\u5236&#xff0c;\u6700\u7ec8\u663e\u793a\u65f6\u90fd\u4f1a\u8f6c\u4e3a10\u8fdb\u5236<\/p>\n<p>\u6d6e\u70b9\u578b&#xff1a; 1.2&#xff0c;0.123&#xff0c;3.14e11&#061;&gt;3,14*10^11 \u79d1\u5b66\u8ba1\u6570\u6cd5<\/p>\n<p>0.375&#043;0.248.toFixed(2)&#061;&gt;\u4fdd\u7559\u4e24\u4f4d\u5c0f\u6570&#xff08;\u56db\u820d\u4e94\u5165&#xff09;<br \/>\nconsole.log(1.0-0.9&#061;&#061;0.1)\/\/false<br \/>\nconsole.log(1.0&#043;0.9&#061;&#061;1.9)\/\/true<\/p>\n<p>NaN&#xff08;not a number&#xff09;&#xff1a; NaN\u662f\u4e00\u4e2a\u7279\u6b8a\u7684number\u503c&#xff0c;not a number\u8868\u793a\u975e\u6570\u5b57&#xff0c;\u5f53\u7a0b\u5e8f\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u8ba1\u7b97\u9519\u8bef\u65f6&#xff0c;\u5c06\u4ea7\u751f\u4e00\u4e2a\u65e0\u610f\u4e49\u7684\u6570\u5b57NaN NaN\u4e0e\u4efb\u4f55\u503c\u90fd\u4e0d\u60f3\u7b49&#xff0c;\u5305\u62ecNaN\u672c\u8eab \u4efb\u4f55\u6d89\u53caNaN\u7684\u64cd\u4f5c&#xff0c;\u7ed3\u679c\u90fd\u4e3aNaN<\/p>\n<p>var a&#061;&#039;hello&#039;;<br \/>\nb&#061;10;<br \/>\nalert(a-b)  \/\/ NaN<\/p>\n<h3>Boolean<\/h3>\n<p>\u503c\u53ea\u6709true\u548cfalse\u3002\u5206\u522b\u4ee3\u8868\u903b\u8f91\u771f\u4e0e\u5047<br \/>\n\u5e03\u5c14\u503c\u901a\u5e38\u7528\u6765\u8868\u793a\u6bd4\u8f83\u6240\u5f97\u7684\u7ed3\u679c<br \/>\ntrue\u548cfalse\u662f\u4e25\u683c\u533a\u5206\u5927\u5c0f\u5199\u7684<\/p>\n<p>var n&#061;10;<br \/>\nif(n&gt;8){<br \/>\n    alert(&#039;\u6211\u662ftrue&#039;);<br \/>\n}else{<br \/>\n    alert(&#039;\u6211\u662ffalse&#039;);<br \/>\n}<\/p>\n<h3>undefined\u3010\u4e86\u89e3\u3011<\/h3>\n<p>\u5b9a\u4e49\u4e86\u4e00\u4e2a\u53d8\u91cf\u4f46\u6ca1\u6709\u4e3a\u8be5\u53d8\u91cf\u8d4b\u503c&#xff0c;\u4f7f\u7528\u4e86\u4e00\u4e2a\u5e76\u672a\u8d4b\u503c\u7684\u53d8\u91cf<br \/>\n\u4f7f\u7528\u4e86\u4e00\u4e2a\u4e0d\u5b58\u5728\u7684\u5bf9\u8c61\u7684\u5c5e\u6027\u65f6<\/p>\n<h3>null\u3010\u4e86\u89e3\u3011<\/h3>\n<ul>\n<li>null\u8868\u793a\u4e00\u4e2a\u7a7a\u503c<\/li>\n<li>null\u4e0d\u7b49\u4e8e\u7a7a\u5b57\u7b26\u4e32&#034;&#034;\u3001&#039;&#039;\u62160<\/li>\n<li>null\u548cundefined\u7684\u533a\u522b\u662f&#xff0c;null\u8868\u793a\u4e00\u4e2a\u53d8\u91cf\u88ab\u8d4b\u4e88\u4e86\u4e00\u4e2a\u7a7a\u503c&#xff0c;\u800cundefined\u5219\u8868\u793a\u8be5\u53d8\u91cf\u5c1a\u672a\u88ab\u8d4b\u503c<\/li>\n<\/ul>\n<p>console.log(null &#061;&#061; null) \/\/ true<br \/>\nconsole.log(NaN &#061;&#061; NaN);  \/\/ false<br \/>\nconsole.log(undefined &#061;&#061; undefined); \/\/ true<\/p>\n<h3>Array(\u6570\u7ec4)\u3010\u91cd\u8981\u3011<\/h3>\n<p>\u6570\u7ec4\u4e2d\u5b58\u50a8\u7684\u6570\u636e&#xff0c;\u90fd\u6709\u81ea\u5df1\u7684\u7f16\u53f7&#xff0c;\u7f16\u53f7\u4ece0\u5f00\u59cb&#xff0c;\u4f9d\u6b21\u9012\u589e1&#xff08;\u4e0b\u6807\/\u7d22\u5f15\/\u7f16\u53f7&#xff09;<br \/>\n\u5c06\u6765\u53ef\u4ee5\u5229\u7528\u6709\u5e8f\u7684\u7d22\u5f15\u83b7\u53d6\u6570\u636e<br \/>\n\u521b\u5efa\u6570\u7ec4<br \/>\n\u65b9\u6cd5\u4e00&#xff1a;<\/p>\n<p><span class=\"token keyword\">var<\/span> \u6570\u7ec4\u540d<span class=\"token operator\">&#061;<\/span><span class=\"token keyword\">new<\/span> <span class=\"token class-name\">Array<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u65b9\u6cd5\u4e8c&#xff1a;<\/p>\n<p><span class=\"token keyword\">var<\/span> cars<span class=\"token operator\">&#061;<\/span><span class=\"token keyword\">new<\/span> <span class=\"token class-name\">Array<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Audi&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;BMW&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;BYD&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u65b9\u6cd5\u4e09&#xff1a;<\/p>\n<p><span class=\"token keyword\">var<\/span> cars<span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;Audi&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;BMW&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;BYD&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u83b7\u53d6\u6570\u7ec4\u4e2d\u7684\u503c<\/p>\n<p>var arr &#061; [&#039;\u5c11\u6797\u5bfa&#039;,&#039;\u9f99\u95e8\u77f3\u7a9f&#039;,&#039;\u4e8c\u4e03\u5854&#039;,&#039;\u534e\u8c0a\u7535\u5f71\u5c0f\u9547&#039;];<br \/>\nconsole.log&#xff08;arr[0]&#xff09;;<br \/>\nconsole.log&#xff08;arr[1]&#xff09;;<br \/>\nconsole.log&#xff08;arr[2]&#xff09;;<br \/>\nconsole.log&#xff08;arr[3]&#xff09;;<\/p>\n<p>\u5faa\u73af\u904d\u5386\u8f93\u51fa\u6240\u6709\u7684\u6570\u636e<\/p>\n<p>var cars&#061;new Array(&#034;Audi&#034;,&#034;BMW&#034;,&#034;BYD&#034;);<br \/>\nfor(i&#061;0;i&lt;cars.length;i&#043;&#043;){<br \/>\n  document.write(cars[i]&#043;&#034;&lt;br\/&gt;&#034;)<br \/>\n}<\/p>\n<p>\u591a\u7ef4\u6570\u7ec4<\/p>\n<p>var arr &#061; [<br \/>\n  [&#039;\u5317\u4eac&#039;,&#039;\u4e0a\u6d77&#039;,&#039;\u6df1\u5733&#039;],<br \/>\n  [&#039;\u5408\u80a5&#039;,&#039;\u77f3\u5bb6\u5e84&#039;,&#039;\u6606\u660e&#039;],<br \/>\n  [&#039;&#039;,&#039;&#039;,&#039;&#039;]<br \/>\n];<br \/>\nconsole.log&#xff08;arr[0]&#xff09;;<br \/>\nconsole.log&#xff08;arr[1]&#xff09;;<br \/>\nconsole.log&#xff08;arr[2]&#xff09;;<br \/>\nconsole.log&#xff08;arr[3]&#xff09;;<\/p>\n<p>\u91cc\u9762\u53ef\u4ee5\u5b58\u50a8\u591a\u4e2a\u503c&#xff1a;\u6570\u7ec4&#xff0c;json\u5bf9\u8c61<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u4e00\u5207\u7686\u5bf9\u8c61&#xff1a;\u6570\u5b57&#xff0c;string&#xff0c;boolean&#xff0c;array<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 1. \u521b\u5efa\u6570\u7ec4<\/p>\n<p>var arr &#061; new Array(); \/\/ \u521b\u5efa\u51fa\u6765\u7684\u662f\u7a7a\u6570\u7ec4<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 var arr &#061; new Array(\u201c\u5f20\u4e09\u201d,\u2018\u674e\u56db\u2019,\u2018\u738b\u4e94\u2019); \/\/ \u521b\u5efa\u51fa\u6765\u7684\u662f\u5e26\u6709\u5185\u5bb9\u7684\u6570\u636e<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 var arr &#061; [];<\/p>\n<p>2. \u83b7\u53d6\u6570\u636e<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1&#xff09;\u83b7\u53d6\u6240\u6709\u6570\u636e<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 console.log(arr);<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 2&#xff09;\u83b7\u53d6\u5176\u4e2d\u67d0\u4e2a\u6570\u636e<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u4e0b\u6807&#xff1a;number&#xff0c;\u6574\u5f62&#xff0c;0-\u6b63\u65e0\u7a77<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 console.log(\u6570\u7ec4\u7684\u540d\u79f0[\u4e0b\u6807]);<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 console.log(arr[1]);<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 console.log(arr[8]);<\/p>\n<p>\u6570\u7ec4\u7684\u5d4c\u5957<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u6570\u7ec4\u4e2d\u5d4c\u5957\u53e6\u5916\u4e00\u4e2a\u6570\u7ec4<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/ \u591a\u7ef4\u6570\u7ec4&#xff0c;\u4e8c\u7ef4\u6570\u7ec4<\/p>\n<p>            <span class=\"token keyword\">var<\/span> stu <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n                <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;\u9e3f\u84991&#039;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#039;\u9e3f\u84992&#039;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#039;\u9e3f\u84993&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;ui1&#039;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#039;ui2&#039;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#039;ui3&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;db1&#039;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#039;db2&#039;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#039;db3&#039;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n            <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            console<span class=\"token punctuation\">.<\/span><span class=\"token function\">log<\/span><span class=\"token punctuation\">(<\/span>stu<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            console<span class=\"token punctuation\">.<\/span><span class=\"token function\">log<\/span><span class=\"token punctuation\">(<\/span>stu<span class=\"token punctuation\">[<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            console<span class=\"token punctuation\">.<\/span><span class=\"token function\">log<\/span><span class=\"token punctuation\">(<\/span>stu<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u6570\u7ec4\u5c31\u662f\u7528\u3010\u3011\u5305\u88f9\u8d77\u6765\u7684\u5185\u5bb9<br \/>\n\u6570\u7ec4\u4e2d\u53ef\u4ee5\u5b58\u653e\u4efb\u610f\u7684\u6570\u636e\u7c7b\u578b<\/p>\n<h3>Object \u5bf9\u8c61\u3010\u91cd\u8981\u3011<\/h3>\n<p>\u4f5c\u7528&#xff1a;\u7528\u4e8e\u63cf\u8ff0\u4e00\u4e2a\u7269\u4f53\u7684\u7279\u5f81\u548c\u884c\u4e3a<br \/>\n\u5bf9\u8c61&#xff1a;\u662f\u4e00\u4e2a\u53ef\u4ee5\u5b58\u50a8\u591a\u4e2a\u6570\u636e\u7684\u5bb9\u5668\u3002<\/p>\n<p>\u9762\u5411\u8fc7\u7a0b&#xff1a;\u6309\u7167\u65f6\u95f4\u7684\u53d1\u751f\u987a\u5e8f&#xff0c;\u4ece\u4e0a\u5f80\u4e0b\u4f9d\u6b21\u6267\u884c<br \/>\n\u5bf9\u8c61\u5bf9\u8c61&#xff1a;\u6307\u6325\u5bf9\u8c61\u505a\u67d0\u4ef6\u4e8b\u60c5<\/p>\n<p>\u5bf9\u8c61:<br \/>\n\u5c5e\u6027&#xff1a;\u672c\u8eab\u6240\u62e5\u6709\u7684\u7279\u6027<br \/>\n\u65b9\u5f0f&#xff1a;\u80fd\u505a\u7684\u4e8b\u60c5<br \/>\n\u5bf9\u8c61&#xff1a;<br \/>\n{ },\u4f7f\u7528{ }\u5305\u62ec\u8d77\u6765\u7684\u90fd\u662f\u5bf9\u8c61<br \/>\n[ ],\u4f7f\u7528[ ]\u5305\u62ec\u8d77\u6765\u7684\u90fd\u662f\u6570\u7ec4<\/p>\n<p>\u521b\u5efa\u5bf9\u8c61&#xff1a;<br \/>\n\u65b9\u6cd5\u4e00&#xff1a;var \u5bf9\u8c61\u540d\u79f0 &#061; new Object();<br \/>\n\u65b9\u6cd5\u4e8c&#xff1a;var \u5bf9\u8c61\u540d\u79f0 &#061; {\u2018\u952e\u2019&#xff1a;\u2018\u503c\u2019&#xff0c;\u2018\u952e\u2019&#xff1a;\u2018\u503c&#xff0c;\u2018\u952e\u2019&#xff1a;\u2018\u503c&#xff0c;\u2018\u952e\u2019&#xff1a;\u2018\u503c}&#xff1b;<\/p>\n<p>\u521b\u5efa\u5bf9\u8c61<\/p>\n<p>    \/\/ \u8f66<br \/>\n    var car &#061; new Object();<br \/>\n    \/\/ \u5c5e\u6027<br \/>\n    car.color &#061; &#039;red&#039;;<br \/>\n    car.brand &#061; &#039;BMW&#039;;<br \/>\n    car.price &#061; 28.5;<br \/>\n    \/\/ \u65b9\u6cd5<br \/>\n    car.run &#061; function(){<br \/>\n        console.log(&#039;\u6211\u80fd\u8dd1&#039;);<br \/>\n    }<br \/>\n    car.stop &#061; function(){<br \/>\n        console.log(&#039;\u6211\u80fd\u505c\u6b62&#039;);<br \/>\n    }<br \/>\n    car.setSpeed &#061; function(){<br \/>\n        console.log(&#039;\u6211\u80fd\u5b9a\u901f\u5de1\u822a&#039;);<br \/>\n    }<\/p>\n<p>\u83b7\u53d6\u5bf9\u8c61\u4e2d\u7684\u5c5e\u6027\u548c\u65b9\u6cd5<\/p>\n<p>\/\/ \u8c03\u7528\u6574\u4e2a\u5bf9\u8c61<br \/>\nconsole.log(car);<br \/>\n\/\/ \u7c7b\u4f3c\u6570\u7ec4\u7684\u65b9\u5f0f\u8c03\u7528<br \/>\nconsole.log(car[&#039;color&#039;]);<br \/>\nconsole.log(car[&#039;price&#039;]);<br \/>\n\/\/ \u4f7f\u7528\u5bf9\u8c61\u7684\u65b9\u5f0f\u8c03\u7528<br \/>\nconsole.log(car.color)<br \/>\nconsole.log(car.price);<br \/>\n\/\/ \u8c03\u7528\u5bf9\u8c61\u91cc\u9762\u7684\u65b9\u6cd5<br \/>\ncar.run();<\/p>\n<p>\u4f7f\u7528\u7b2c\u4e8c\u79cd\u65b9\u5f0f&#xff1a;\u521b\u5efa\u4eba\u7684\u5bf9\u8c61<\/p>\n<p>var obj2 &#061; {<br \/>\n    \/\/ \u5b9a\u4e49\u5c5e\u6027<br \/>\n    &#039;name&#039;:&#039;jack&#039;,<br \/>\n    &#039;sex&#039;:&#039;\u7537&#039;,<br \/>\n    &#039;age&#039;: 18,<br \/>\n    \/\/ \u521b\u5efa\u65b9\u6cd5<br \/>\n    &#039;eat&#039;:function(){<br \/>\n        console.log(&#039;\u6211\u80fd\u5403&#039;);<br \/>\n    },<br \/>\n    &#039;sleep&#039;:function(){<br \/>\n        console.log(&#039;\u6211\u80fd\u7761\u89c9&#039;);<br \/>\n    }<br \/>\n};<br \/>\n\/\/ \u83b7\u53d6\u5bf9\u8c61\u4e2d\u7684\u6570\u636e&#xff1a;\u5bf9\u8c61\u540d.\u5c5e\u6027\u540d<br \/>\nconsole.log(obj2);<br \/>\n\/\/ \u8c03\u7528\u5c5e\u6027<br \/>\nconsole.log(obj2.name);<br \/>\n\/\/ \u8c03\u7528\u65b9\u6cd5<br \/>\nobj2.eat();<\/p>\n<h5>JS\u7684\u4e25\u683c\u6a21\u5f0f\u3010\u4e86\u89e3\u3011<\/h5>\n<p>\u5728js\u4e2d\u5b58\u5728\u4e00\u4e2a\u4e25\u683c\u6a21\u5f0f&#xff0c;\u4f7f\u7528 use strict\u6765\u5b9a\u4e49&#xff1b;\u8fd9\u4e2a\u662fES5\u4e2d\u65b0\u589e\u52a0\u7684&#xff1b;<\/p>\n<p>&#034;use strict&#034;;<br \/>\nx &#061; 3.14;<br \/>\nconsole.log(x);<\/p>\n<p>&#034;\u4e25\u683c\u6a21\u5f0f&#034;\u4f53\u73b0\u4e86Javascript\u66f4\u5408\u7406\u3001\u66f4\u5b89\u5168\u3001\u66f4\u4e25\u8c28\u7684\u53d1\u5c55\u65b9\u5411&#xff0c;\u5305\u62ecIE 10\u5728\u5185\u7684\u4e3b\u6d41\u6d4f\u89c8\u5668&#xff0c;\u90fd\u5df2\u7ecf\u652f\u6301\u5b83&#xff0c;\u8bb8\u591a\u5927\u9879\u76ee\u5df2\u7ecf\u5f00\u59cb\u5168\u9762\u62e5\u62b1\u5b83<\/p>\n<p>\u53e6\u4e00\u65b9\u9762&#xff0c;\u540c\u6837\u7684\u4ee3\u7801&#xff0c;\u5728&#034;\u4e25\u683c\u6a21\u5f0f&#034;\u4e2d&#xff0c;\u53ef\u80fd\u4f1a\u6709\u4e0d\u4e00\u6837\u7684\u8fd0\u884c\u7ed3\u679c&#xff1b;\u4e00\u4e9b\u5728&#034;\u6b63\u5e38\u6a21\u5f0f&#034;\u4e0b\u53ef\u4ee5\u8fd0\u884c\u7684\u8bed\u53e5&#xff0c;\u5728&#034;\u4e25\u683c\u6a21\u5f0f&#034;\u4e0b\u5c06\u4e0d\u80fd\u8fd0\u884c\u3002<\/p>\n<h3>\u6570\u636e\u7c7b\u578b\u7684\u68c0\u6d4b<\/h3>\n<p>![[d3c7e3c7-df2a-499b-91e6-2d28513ae6d4 (1).png]]<\/p>\n<h3>\u6570\u636e\u7c7b\u578b\u8f6c\u6362<\/h3>\n<p>\u81ea\u52a8\u8f6c\u6362&#xff1a;js\u4f1a\u901a\u8fc7\u5173\u7cfb\u8fd0\u7b97\u7b26&#xff0c;\u903b\u8f91\u8fd0\u7b97\u7b26&#xff0c;\u7b97\u6570\u8fd0\u7b97\u7b26&#xff0c;if\u8bed\u53e5\u7b49\u5b9e\u73b0\u9690\u5f0f\u8f6c\u6362<br \/>\n\u6839\u636e\u9700\u8981\u81ea\u52a8\u8fdb\u884c\u7c7b\u578b\u8f6c\u6362&#xff0c;\u4f46\u662f\u8f6c\u6362\u65f6\u4f1a\u9075\u5faa\u4e00\u5b9a\u7684\u89c4\u5219<\/p>\n<p>\u5f3a\u884c\u8f6c\u6362-&gt;\u901a\u8fc7\u5185\u7f6e\u5bf9\u8c61\u7684\u65b9\u6cd5\u5f3a\u5236\u8f6c\u6362&#xff0c;\u6bd4\u5982&#xff1a;parseInt(),parseFloat(),Number(),String(),Boolean(),toString&#xff08;&#xff09;<\/p>\n<h5>\u8f6c\u4e3a\u5b57\u7b26\u4e32\u3010\u638c\u63e1\u3011<\/h5>\n<p>\u81ea\u52a8\u8f6c\u6362<\/p>\n<table>\n<tr>\u7c7b\u578b\u8f6c\u6362\u5b57\u7b26\u4e32\u578b\u540e\u7684\u7ed3\u679c<\/tr>\n<tbody>\n<tr>\n<td>number<\/td>\n<td>NaN&#xff0c;0&#xff0c;\u6216\u6570\u503c\u5bf9\u5e94\u7684\u5b57\u7b26\u4e32<\/td>\n<\/tr>\n<tr>\n<td>null<\/td>\n<td>\u201dnull\u201c<\/td>\n<\/tr>\n<tr>\n<td>boolean<\/td>\n<td>\u201dtrue\u201c&#xff0c;\u201dfalse\u201c<\/td>\n<\/tr>\n<tr>\n<td>undefined<\/td>\n<td>\u201dundefined\u201c<\/td>\n<\/tr>\n<tr>\n<td>object<\/td>\n<td>\u82e5\u5bf9\u8c61\u5b58\u5728\u4e3a\u5176toString()\u65b9\u6cd5\u7684\u503c&#xff0c;\u82e5\u5bf9\u8c61\u4e0d\u5b58\u5728\u4e3a\u201dundefined\u201c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5f3a\u5236\u8f6c\u6362&#xff1a; String&#xff08;&#xff09;&#xff0c;object.toString()<br \/>\n\u7ec3\u4e60&#xff1a;<\/p>\n<p>0o123&#061;?<br \/>\n0&#043;&#039;123&#039;&#061;?<br \/>\n123&#043;&#039;100&#039;&#061;?<br \/>\n1&#043;&#039;2abc&#039;&#061;?<br \/>\nnull&#043;&#039;12abc&#039;&#061;?<br \/>\nconsole.log(Number([])); \/\/ 0<br \/>\nString(undefined)&#061;?<br \/>\ndate&#061;new Date()<br \/>\ndate.toString()&#061;?<\/p>\n<h5>\u8f6c\u4e3a\u6570\u5b57\u7c7b\u578b\u3010\u638c\u63e1\u3011<\/h5>\n<p>\u81ea\u52a8\u8f6c\u6362<\/p>\n<table>\n<tr>\u7c7b\u578b\u8f6c\u4e3a\u6570\u5b57\u578b\u540e\u7684\u7ed3\u679c<\/tr>\n<tbody>\n<tr>\n<td>string<\/td>\n<td>\u82e5\u5185\u5bb9\u4e3a\u6570\u5b57\u5219\u4e3a\u76f8\u5e94\u6570\u5b57&#xff0c;\u5426\u5219\u4e3aNaN<\/td>\n<\/tr>\n<tr>\n<td>null<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>boolean<\/td>\n<td>true\u8f6c\u4e3a1&#xff0c;false\u8f6c\u4e3a0<\/td>\n<\/tr>\n<tr>\n<td>undefined<\/td>\n<td>NaN<\/td>\n<\/tr>\n<tr>\n<td>object<\/td>\n<td>NaN<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6ce8\u610f&#xff1a;\u6570\u5b66\u8fd0\u7b97&#xff08;\u7279\u6b8a\u60c5\u51b5&#xff1a;&#043;\u518d\u51fa\u73b0\u5b57\u7b26\u4e32\u7684\u60c5\u51b5\u4e0b\u4e0d\u662f\u6570\u5b66\u8fd0\u7b97&#xff0c;\u800c\u662f\u5b57\u7b26\u4e32\u7684\u62fc\u63a5&#xff09;<\/p>\n<p>\u5f3a\u5236\u8f6c\u6362 Number()<br \/>\n\u6309\u7167\u81ea\u52a8\u8f6c\u6362\u89c4\u5219\u8f6c\u6362 parseInt(string) \u3001parseFloat(string)<br \/>\nisNaN() \u51fd\u6570\u7528\u4e8e\u68c0\u67e5\u5176\u53c2\u6570\u662f\u5426\u662f\u975e\u6570\u5b57\u503c<br \/>\n\u6ce8\u610f&#xff1a;parseInt\u8fd8\u53ef\u4ee5\u63a5\u53d7\u7b2c\u4e8c\u4e2a\u53c2\u6570&#xff08;2\u523036\u4e4b\u95f4&#xff09;&#xff0c;\u8868\u793a\u5457\u89e3\u6790\u7684\u503c\u7684\u8fdb\u5236&#xff0c;\u8fd4\u56de\u8be5\u503c\u5bf9\u5e94\u768410\u8fdb\u5236\u6570\u3002parseInt\u7684\u7b2c\u4e8c\u4e2a\u53c2\u6570\u4e3a10&#xff0c;\u5373\u9ed8\u8ba4\u662f\u5341\u8fdb\u5236\u8f6c\u5341\u8fdb\u5236<\/p>\n<p>parseInt(&#039;1000&#039;); \/\/ 1000<br \/>\n\/\/ \u7b49\u540c\u4e8e<br \/>\nparseInt(&#039;1000&#039;,10); \/\/ 1000<br \/>\nparseInt(&#039;1000&#039;&#xff0c;2); \/\/ 8<br \/>\nparseInt(&#039;1000&#039;&#xff0c;6); \/\/ 216<br \/>\nparseInt(&#039;1000&#039;&#xff0c;8); \/\/ 512<\/p>\n<p>\u7ec3\u4e60&#xff1a;<\/p>\n<p>console.log(0x2f);<br \/>\nconsole.log(061);<br \/>\nconsole.log(Number(null));<br \/>\nconsole.log(Number(undefined));<br \/>\nconsole.log(Number(&#039;123.12&#039;));<br \/>\nconsole.log(true&#043;123);<br \/>\nconsole.log(Number(&#039;123abc&#039;));<br \/>\nconsole.log(parseInt(&#039;012.6a23b&#039;));<br \/>\nconsole.log(parseFloat(&#039;a12.6a23b&#039;));<br \/>\nconsole.log(parseInt(true));<\/p>\n<h5>\u8f6c\u4e3a\u5e03\u5c14\u7c7b\u578b\u3010\u638c\u63e1\u3011<\/h5>\n<p>\u81ea\u52a8\u8f6c\u6362<\/p>\n<table>\n<tr>\u7c7b\u578b\u8f6c\u6362\u5e03\u5c14\u578b\u540e\u7684\u7ed3\u679c<\/tr>\n<tbody>\n<tr>\n<td>\u201d\u201c\u6216\u201d<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td>0\u62160.0<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td>NaN<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td>undefined<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td>null<\/td>\n<td>false<\/td>\n<\/tr>\n<tr>\n<td>\u5176\u4ed6<\/td>\n<td>true<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5f3a\u5236\u8f6c\u6362 Boolean(), !!<br \/>\n\u7ec3\u4e60&#xff1a;<\/p>\n<p>if(0 || &#034;&#034; || &#039;&#039; || NaN || undefined || null){<br \/>\n  alert(&#039;true&#039;)<br \/>\n}else{<br \/>\n  alert(&#039;false&#039;)<br \/>\n}<br \/>\n!!123.11  \/\/ true<br \/>\nBoolean(&#039;abc&#039;) \/\/ true<br \/>\nconsole.log(Boolean([])); \/\/ true<\/p>\n<p>\u7279\u6b8a\u6848\u4f8b<\/p>\n<p>console.log(Boolean([])); \/\/ true<br \/>\nconsole.log([] &#061;&#061; false);   \/\/ true; &#061;&#061;\u4e24\u8fb9\u7684\u6570\u636e\u7c7b\u578b\u4e0d\u4e00\u81f4&#xff0c;\u9700\u8981\u8f6c\u4e3a\u6570\u5b57\u8fdb\u884c\u6bd4\u8f83&#xff1b;[]&#061;&gt;\u5b57\u7b26\u4e32&#039;&#039;&#061;&gt;\u6570\u5b570<br \/>\nconsole.log(![] &#061;&#061; false); \/\/ true  &#061;&#061;\u7684\u4f18\u5148\u7ea7\u6bd4\u8f83\u4f4e&#xff0c;\u80af\u5b9a\u662f\u5148\u7b97\u5de6\u8fb9 ![] \u7136\u540e\u4e0e\u540e\u9762\u8fdb\u884c\u6bd4\u8f83&#xff0c;[]\u8f6c\u4e3a\u5e03\u5c14\u503c\u4e3atrue \u53d6\u53cd false false&#061;&#061;false<br \/>\nconsole.log(&#039;0&#039; &#061;&#061; false); \/\/ true<\/p>\n<p>\u5728&#061;&#061;\u6bd4\u8f83\u7684\u8fc7\u7a0b\u4e2d&#xff0c;\u6570\u636e\u8f6c\u6362\u7684\u89c4\u5219 \u7c7b\u578b\u4e00\u6837\u7684\u51e0\u4e2a\u7279\u6b8a\u70b9&#xff1a;<\/p>\n<p>{} &#061;&#061; {} false,\u5bf9\u8c61\u5bf9\u6bd4\u7684\u662f\u5806\u5185\u5b58\u7684\u5730\u5740<br \/>\n[] &#061;&#061; [] false<br \/>\nNaN &#061;&#061; NaN false<br \/>\n\u7c7b\u578b\u4e0d\u4e00\u6837\u7684\u8f6c\u6362\u89c4\u5219&#xff1a;<\/p>\n<p>null &#061;&#061; undefined true&#xff0c;\u4f46\u662f\u6362\u6210 &#061;&#061;&#061; \u7ed3\u679c\u662ffalse&#xff08;\u56e0\u4e3a\u7c7b\u578b\u4e0d\u4e00\u81f4&#xff09;&#xff0c;\u5269\u4e0bnull\/undefined\u548c\u5176\u4ed6\u4efb\u4f55\u6570\u636e\u7c7b\u578b\u503c\u90fd\u4e0d\u76f8\u7b49<\/p>\n<p>\u5b57\u7b26\u4e32 &#061;&#061; \u5bf9\u8c61&#xff0c;\u8981\u628a\u5bf9\u8c61\u8f6c\u4e3a\u5b57\u7b26\u4e32<\/p>\n<p>\u5269\u4e0b\u5982\u679c &#061;&#061; \u4e24\u8fb9\u6570\u636e\u7c7b\u578b\u4e0d\u4e00\u81f4&#xff0c;\u90fd\u662f\u9700\u8981\u8f6c\u6362\u4e3a\u6570\u5b57\u518d\u8fdb\u884c\u6bd4\u8f83<br \/>\n\u5982\u679c\u7c7b\u578b\u90fd\u662f\u5b57\u7b26\u4e32&#xff0c;\u5c31\u4f1a\u6309\u7167ASCII\u7f16\u7801\u7684\u8fdb\u884c\u5bf9\u6bd4<\/p>\n<h3>\u8fd0\u7b97\u7b26<\/h3>\n<h5>\u8868\u8fbe\u5f0f<\/h5>\n<p>\u5e38\u91cf 1.2   &#039;str&#039;  false<br \/>\n\u53d8\u91cf x  y<br \/>\n\u590d\u5408 x&#043;1<\/p>\n<p>\u64cd\u4f5c\u7b26&#xff1a;\u8868\u8fbe\u5f0f x&#043;1\u4e2d\u7684x&#xff0c;1\u4e3a\u64cd\u4f5c\u7b26 \u8fd0\u7b97\u7b26&#xff1a;\u8868\u8fbe\u5f0fx&#043;1\u7684&#xff0c;&#043;\u4e3a\u8fd0\u7b97\u7b26<\/p>\n<h5>\u7b97\u672f\u8fd0\u7b97\u7b26&#xff08;&#043;&#xff0c;-&#xff0c; *&#xff0c;\/&#xff0c;%\u3010\u91cd\u8981\u3011&#xff0c;&#043;&#043;\u3010\u91cd\u8981\u3011&#xff0c;\u2013&#xff09;<\/h5>\n<p>\u201c&#043;\u201d\u7b97\u6570\u52a0\u548c\u5b57\u7b26\u4e32\u60f3\u63a5 i&#043;&#043; \u5148\u8d4b\u503c&#xff0c;\u518d\u52a01&#xff1b;&#043;&#043;i \u5148\u52a01&#xff0c;\u518d\u8d4b\u503c<\/p>\n<p>\/\/ \u5b9e\u73b0\u5404\u884c\u6362\u8272\u6548\u679c<br \/>\nfor(var i&#061;1;i&lt;&#061;10;i&#043;&#043;){<br \/>\n  if(i%2&#061;&#061;0){<br \/>\n      document.write(&#034;&lt;font color&#061;&#039;red&#039;&gt;&#034;&#043;i&#043;&#034;&lt;\/font&gt;&#034;);<br \/>\n  }else{<br \/>\n      document.write(&#034;&lt;font color&#061;&#039;green&#039;&gt;&#034;&#043;i&#043;&#034;&lt;\/font&gt;&#034;);<br \/>\n  }<br \/>\n}<\/p>\n<p>\u6ce8\u610f&#xff1a;\u6b63\u53f7\u6709\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362\u529f\u80fd<\/p>\n<p>alert(typeof(&#043;&#039;5&#039;))  \/\/ number<\/p>\n<p>\u601d\u8003\u9898&#xff1a;<\/p>\n<p>7%4&#061;?<br \/>\ni&#061;5<br \/>\nj&#061;i&#043;&#043;<br \/>\nj&#061;?<br \/>\nk&#061;&#043;&#043;i<br \/>\nk&#061;?<br \/>\nm&#061;i&#8211;<br \/>\nm&#061;?<br \/>\nn&#061;&#8211;i<br \/>\nn&#061;?<\/p>\n<h5>\u6bd4\u8f83\u8fd0\u7b97\u7b26&#xff08;&gt;,&lt;,&gt;&#061;,&lt;&#061;,&#061;&#061;,!&#061;\u4e0d\u7b49\u4e8e,!&#061;&#061;\u4e0d\u5168\u7b49\u4e8e&#xff09;\u3010\u4e86\u89e3\u3011<\/h5>\n<p>\u4e13\u95e8\u7528\u4f5c\u5224\u65ad&#xff0c;\u8fd4\u56de\u503c\u7ed3\u679c\u4e3aboolean<\/p>\n<p>console.log(1.2&#043;1.1&#061;&#061;2.3) \/\/true<br \/>\nconsole.log(1.2-1.1&#061;&#061;0.1) \/\/false<\/p>\n<p>\u603b\u7ed3&#xff1a;\u6bd4\u8f83\u8fd0\u7b97\u7b26\u7684\u7ed3\u679c\u662fboolean\u7c7b\u578b<\/p>\n<h5>\u8d4b\u503c\u8fd0\u7b97\u7b26&#xff08;&#061;\u3010\u638c\u63e1\u3011&#xff0c;&#043;&#061;\u3010\u638c\u63e1\u3011&#xff0c;-&#061;&#xff0c; *&#061;&#xff0c;\/&#061;&#xff0c;%&#061;&#xff09;<\/h5>\n<p>&#061; \u8d4b\u503c\u8fd0\u7b97\u7b26<\/p>\n<p>var a &#061; 10;<br \/>\nvar arr &#061; [&#039;\u5f20\u4e09&#039;,&#039;\u674e\u56db&#039;,&#039;\u738b\u6b66&#039;,&#039;\u5b59\u5218&#039;,&#039;\u9a6c\u5947&#039;] <\/p>\n<p>\u8868\u793a\u7ed9num&#043;1&#xff0c;\u518d\u628a\u76f8\u52a0\u4e4b\u540e\u7684\u7ed3\u679c\u8d4b\u7ed9num\u8fd9\u4e2a\u53d8\u91cf<\/p>\n<p>var i&#061;10;<br \/>\ni&#043;&#061;1 \/\/ i&#061;i&#043;1 \u6548\u679c\u4e00\u6837  i&#043;&#043;<\/p>\n<p>\u4f7f\u7528\u573a\u5408&#xff1a;\u7d2f\u52a0\u6c42\u548c&#xff0c;\u5b57\u7b26\u4e32\u62fc\u63a5<\/p>\n<h5>\u903b\u8f91\u8fd0\u7b97\u7b26&#xff08;&#xff01;&#xff0c;&amp;&amp;&#xff0c;||&#xff09;\u3010\u4e24\u8fb9\u5747\u4e3a\u8868\u8fbe\u5f0f\u3011\u3010\u91cd\u8981\u3011<\/h5>\n<table>\n<tr><\/tr>\n<tbody>\n<tr>\n<td>\u8fd0\u7b97\u7b26<\/td>\n<td>\u89e3\u91ca<\/td>\n<\/tr>\n<tr>\n<td>!<\/td>\n<td>\u903b\u8f91\u53d6\u53cd<\/td>\n<\/tr>\n<tr>\n<td>&amp;&amp;<\/td>\n<td>\u903b\u8f91\u4e14&#xff1b;\u53ea\u6709\u4e24\u4e2a\u64cd\u4f5c\u6570\u90fd\u4e3a true \u65f6&#xff0c;\u624d\u8fd4\u56de true&#xff0c;\u5426\u5219\u8fd4\u56de false\u3002<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>??&#xff08;\u4e86\u89e3&#xff09;<\/td>\n<td>\u7a7a\u503c\u5408\u5e76\u8fd0\u7b97\u7b26&#xff0c;\u5982\u679c\u5de6\u4fa7\u7684\u8868\u8fbe\u5f0f\u4e3a null\u6216\u8005 undefined \u65f6&#xff0c;\u8fd4\u56de\u5176\u53f3\u4fa7\u8868\u8fbe\u5f0f&#xff0c;\u5426\u5219\u8fd4\u56de\u5de6\u4fa7\u8868\u8fbe\u5f0f\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u903b\u8f91\u8fd0\u7b97\u7b26\u7528\u4e8e\u6d4b\u5b9a\u53d8\u91cf\u6216\u503c\u4e4b\u95f4\u7684\u903b\u8f91<\/p>\n<p>|| \u5b58\u5728\u65ad\u70b9\u95ee\u9898&#xff0c;\u7b2c\u4e00\u4e2a\u5f0f\u5b50\u6210\u7acb&#xff0c;\u4e0d\u5728\u6267\u884c\u7b2c\u4e8c\u4e2a\u5f0f\u5b50&#xff1b;\u5982\u679c\u7b2c\u4e00\u4e2a\u5f0f\u5b50\u4e0d\u6210\u7acb&#xff0c;\u6267\u884c\u7b2c\u4e8c\u4e2a\u767b\u5f0f(\u771f\u5047\u4e3a\u771f&#xff0c;\u5047\u5047\u4e3a\u5047&#xff0c;\u771f\u771f\u4e3a\u771f)<\/p>\n<p>&amp;&amp; \u5b58\u5728\u65ad\u70b9\u95ee\u9898&#xff0c;\u5982\u679c&amp;&amp;\u524d\u9762\u7684\u503c\u4e3afalse,\u540e\u9762\u7684\u4e0d\u518d\u8fd0\u884c<\/p>\n<p>&amp;&amp;\u5f0f\u5b50\u4e24\u8fb9\u540c\u65f6\u6210\u7acb&#xff0c;\u6267\u884c\u7684\u662fif&#xff08;true&#xff09;&#xff0c;\u53ea\u8981\u6709\u4e00\u4e2a\u4e0d\u6210\u7acb\u3002\u6216\u4e24\u4e2a\u90fd\u4e0d\u6210\u7acb\u6267\u884cfalse<\/p>\n<h5>||\u8fd0\u7b97\u65b9\u6cd5\u771f\u524d\u5047\u540e&#xff1a;<\/h5>\n<p>\u53ea\u8981\u201c||\u201d\u524d\u9762\u4e3afalse,\u4e0d\u7ba1\u201c||\u201d\u540e\u9762\u662ftrue\u8fd8\u662ffalse&#xff0c;\u90fd\u8fd4\u56de\u201c||\u201d\u540e\u9762\u7684\u503c\u3002<br \/>\n\u53ea\u8981\u201c||\u201d\u524d\u9762\u4e3atrue,\u4e0d\u7ba1\u201c||\u201d\u540e\u9762\u662ftrue\u8fd8\u662ffalse&#xff0c;\u90fd\u8fd4\u56de\u201c||\u201d\u524d\u9762\u7684\u503c\u3002<\/p>\n<p>&amp;&amp;\u8fd0\u7b97\u65b9\u6cd5&#xff1a;<\/p>\n<p>  \u53ea\u8981\u201c&amp;&amp;\u201d\u524d\u9762\u662ffalse&#xff0c;\u65e0\u8bba\u201c&amp;&amp;\u201d\u540e\u9762\u662ftrue\u8fd8\u662ffalse&#xff0c;\u7ed3\u679c\u90fd\u5c06\u8fd4\u201c&amp;&amp;\u201d\u524d\u9762\u7684\u503c;<br \/>\n  \u53ea\u8981\u201c&amp;&amp;\u201d\u524d\u9762\u662ftrue&#xff0c;\u65e0\u8bba\u201c&amp;&amp;\u201d\u540e\u9762\u662ftrue\u8fd8\u662ffalse&#xff0c;\u7ed3\u679c\u90fd\u5c06\u8fd4\u201c&amp;&amp;\u201d\u540e\u9762\u7684\u503c;<\/p>\n<p>\u6848\u4f8b&#xff1a;<\/p>\n<p>if(0 &amp;&amp; 5){<br \/>\n  console.log(&#039;\u771f&#039;);<br \/>\n}else{<br \/>\n  console.log(&#039;\u5047&#039;);<br \/>\n}<br \/>\nconsole.log(10&amp;&amp;5);<br \/>\nconsole.log(0&amp;&amp;5);<br \/>\nvar a&#061;1;<br \/>\nconsole.log(a&gt;5 &amp;&amp; a&#043;&#043;);<br \/>\nconsole.log(a&lt;5 &amp;&amp; a&#043;&#043;);<br \/>\nconsole.log(a&lt;5 &amp;&amp; &#8211;a);<br \/>\nvar a&#061;10;<br \/>\nif(a&lt;20||a&#043;&#043;){<br \/>\n  console.log(&#039;\u771f&#039;,a);<br \/>\n}else{<br \/>\n  console.log(&#039;\u5047&#039;,a);<br \/>\n}<\/p>\n<p>\u4f7f\u7528\u6280\u5de7&#xff1a;|| \u6216 \u8fd0\u7b97\u7b26\u4f7f\u7528\u6280\u5de7<\/p>\n<p>\/\/ \u5982\u679c\u4f60\u5fc5\u987b\u7ed9\u4e00\u4e2a\u53d8\u91cf\u8d4b\u9ed8\u8ba4\u503c&#xff0c;\u53ef\u4ee5\u7b80\u5355\u7684\u8fd9\u6837\u5199<br \/>\nvar a;<br \/>\nconsole.log(a) \/\/ undefined<br \/>\na &#061; a||&#039;default value&#039;;<br \/>\nconsole.log(a)  \/\/ default value<br \/>\na &#061; a||&#039;new value&#039;;<br \/>\nconsole.log(a)  \/\/ new value<br \/>\n\/\/ \u5728\u51fd\u6570\u4e2d\u4f20\u53c3\u4f7f\u7528&#xff0c;\u5982\u679c\u4f20\u53c3\u5c31\u4f7f\u7528\u4f20\u9012\u8fc7\u6765\u7684\u53c2\u6570&#xff0c;\u6ca1\u6709\u4f20\u53c3\u5c31\u4f7f\u7528\u9ed8\u8ba4\u503c<br \/>\nfunction show(10){<br \/>\n  var shownum &#061; num || 20;<br \/>\n  console.log(shownum);<br \/>\n}<br \/>\nshow(10);<\/p>\n<p>\u601d\u8003:<\/p>\n<p>console.log( 0 || 1 ); \/\/ 1<br \/>\nconsole.log( 1 || 2 ); \/\/ 1<br \/>\nconsole.log( 0 &amp;&amp; 1 ); \/\/ 0<br \/>\nconsole.log( 1 &amp;&amp; 2 ); \/\/ 2<\/p>\n<h5>\u6761\u4ef6\u8fd0\u7b97\u7b26\u3010\u4e09\u5143\u8fd0\u7b97\u7b26\/\u4e09\u76ee\u8fd0\u7b97\u7b26\u3011\u3010\u91cd\u8981\u3011<\/h5>\n<p>\u6761\u4ef6\u8868\u8fbe\u5f0f?\u7ed3\u679c1:\u7ed3\u679c2 \u5982\u679c\u6761\u4ef6\u8868\u8fbe\u5f0f\u7ed3\u679c\u4e3atrue\u5219\u8fd4\u56de\u7ed3\u679c1 \u5982\u679c\u6761\u4ef6\u8868\u8fbe\u5f0f\u7ed3\u679c\u4e3afalse\u5219\u8fd4\u56de\u7ed3\u679c2<\/p>\n<p>var m&#061;100&gt;99?66:33<br \/>\nalert(m)<\/p>\n<p>\u6848\u4f8b&#xff1a;\u5224\u65ad\u67d0\u4e2a\u5e74\u4efd\u662f\u5426\u4e3a\u95f0\u5e74<\/p>\n<h3>\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7<\/h3>\n<p>\u4e0b\u8868\u6309\u4ece\u6700\u9ad8\u5230\u6700\u4f4e\u7684\u4f18\u5148\u7ea7\u5217\u51faJavaScript\u8fd0\u7b97\u7b26\u3002\u5177\u6709\u76f8\u540c\u4f18\u5148\u7ea7\u7684\u8fd0\u7b97\u7b26\u6309\u4ece\u5de6\u81f3\u53f3\u7684\u987a\u5e8f\u6c42\u503c\u3002<br \/>\n![[7d49403e-a913-4c59-a407-67bee15978be.png]]<br \/>\n\u5c0f\u62ec\u53f7&gt;\u7b97\u672f\u8fd0\u7b97\u7b26&gt;\u6bd4\u8f83\u8fd0\u7b97\u7b26&gt;\u903b\u8f91\u8fd0\u7b97\u7b26&gt;\u8d4b\u503c\u8fd0\u7b97\u7b26<\/p>\n<p>\u601d\u8003<\/p>\n<p>var a&#061;5;b&#061;3;<br \/>\nvar c;<br \/>\nc&#061;a&#043;b&gt;3 &amp;&amp; a&lt;a-b*2;<br \/>\n\/\/\u601d\u80031<br \/>\nvar i &#061; 4&#061;&#061;&#039;4&#039; ? &#039;A&#039; : &#039;B&#039;;<br \/>\nalert(i);<br \/>\n\/\/\u601d\u80032<br \/>\nvar m &#061; 3&#043;4&gt;7 || 4*0.25&gt;0.09;<br \/>\nalert(m);<br \/>\n\/\/\u601d\u80033<br \/>\nvar n &#061; 1;<br \/>\nvar s &#061; 0;<br \/>\nif(p&#061;&#8211;n||&#043;&#043;s){<br \/>\n  n&#043;&#043;;<br \/>\n  s&#043;&#043;;<br \/>\n}<br \/>\nalert(n);<br \/>\nalert(s)<br \/>\n\/\/\u601d\u80034<br \/>\nvar a&#061;0;<br \/>\nvar b&#061;4;<br \/>\nif(c&#061;a&amp;&amp;b&lt;6){<br \/>\n  c&#061;a&#043;b;<br \/>\n}else{<br \/>\n  c&#061;a-b;<br \/>\n}<br \/>\nalert(c);<\/p>\n<h3>JSON\u6570\u636e\u7c7b\u578b<\/h3>\n<p>JSON&#xff1a;JSON(JavaScript Object Notation, JS \u5bf9\u8c61\u7b80\u8c31) \u662f\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7684\u6570\u636e\u4ea4\u6362\u683c\u5f0f \u4e3b\u8981\u4f5c\u7528&#xff1a; JSON \u662f\u7528\u4e8e\u5b58\u50a8\u548c\u4f20\u8f93\u6570\u636e\u7684\u683c\u5f0f\u3002 JSON \u901a\u5e38\u7528\u4e8e\u670d\u52a1\u7aef\u5411\u7f51\u9875\u4f20\u9012\u6570\u636e \u3002 \u7279\u6027&#xff1a; json\u7684\u952e\u4e0d\u80fd\u91cd\u590d&#xff0c;\u5982\u679c\u952e\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u5355\u8bcd&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u5199&#xff0c;\u5982\u679c\u952e\u91cc\u9762\u5305\u542b\u4e86\u7a7a\u683c&#xff0c;\u8981\u7528\u5f15\u53f7\u5f15\u8d77\u6765 \u683c\u5f0f&#xff1a;<\/p>\n<p>{key: value, key: value}<\/p>\n<p>\u6570\u636e\u4e3a \u952e\/\u503c \u5bf9\u3002<br \/>\n\u591a\u4e2a\u6570\u636e\u7531\u9017\u53f7\u5206\u9694<br \/>\nvalue\u53ef\u4ee5\u4e3a\u4efb\u610f\u7c7b\u578b<\/p>\n<p>\u5b9a\u4e49\u590d\u6742\u7684json\u683c\u5f0f<\/p>\n<p>var address &#061; {<br \/>\n    &#034;city&#034;:&#034;\u6210\u90fd&#034;,<br \/>\n    &#034;province&#034;:&#039;\u56db\u5ddd&#039;,<br \/>\n    &#034;aaa&#034;:{<br \/>\n       &#034;name&#034;:&#039;Test&#039;,<br \/>\n       &#034;value&#034;:{<br \/>\n           &#034;value&#034;:&#034;123&#034;<br \/>\n       }<br \/>\n     },<br \/>\n     &#034;bbb&#034;:[{<br \/>\n       &#034;name&#034;:&#034;lisi&#034;<br \/>\n     },{<br \/>\n       &#034;name&#034;:&#034;zhangsan&#034;<br \/>\n     },{<br \/>\n       &#034;name&#034;:&#034;wangwu&#034;<br \/>\n     }]<br \/>\n};<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb122\u6b21\u3002\u89e3\u91ca\uff1a\u53ef\u4ee5\u53d8\u5316\u7684\u91cf\u53d8\u91cf\u662f\u7528\u4e8e\u5b58\u50a8\u4fe1\u606f\u7684\u5bb9\u5668\u3010\u5185\u5b58\u7a7a\u95f4\u3011 \u53d8\u91cf\u662f\u4e00\u6bb5\u547d\u540d\u7684\u5b58\u50a8\u7a7a\u95f4 \u53d8\u91cf\u662f\u5728\u7a0b\u5e8f\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u503c\u5141\u8bb8\u6539\u53d8\u53d8\u91cf\u7684\u503c \u53d8\u91cf\u662f\u7531\u53d8\u91cf\u540d\uff0c\u53d8\u91cf\u503c\uff0c\u548c\u53d8\u91cf\u7c7b\u578b\u7ec4\u6210\uff0c\u8fd0\u7b97\u7b26\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[187,190],"topic":[],"class_list":["post-56080","post","type-post","status-publish","format-standard","hentry","category-server","tag-javascript","tag-190"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>8.13 JS\u6570\u636e\u7c7b\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/56080.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"8.13 JS\u6570\u636e\u7c7b\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb122\u6b21\u3002\u89e3\u91ca\uff1a\u53ef\u4ee5\u53d8\u5316\u7684\u91cf\u53d8\u91cf\u662f\u7528\u4e8e\u5b58\u50a8\u4fe1\u606f\u7684\u5bb9\u5668\u3010\u5185\u5b58\u7a7a\u95f4\u3011 \u53d8\u91cf\u662f\u4e00\u6bb5\u547d\u540d\u7684\u5b58\u50a8\u7a7a\u95f4 \u53d8\u91cf\u662f\u5728\u7a0b\u5e8f\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u503c\u5141\u8bb8\u6539\u53d8\u53d8\u91cf\u7684\u503c \u53d8\u91cf\u662f\u7531\u53d8\u91cf\u540d\uff0c\u53d8\u91cf\u503c\uff0c\u548c\u53d8\u91cf\u7c7b\u578b\u7ec4\u6210\uff0c\u8fd0\u7b97\u7b26\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/56080.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-14T04:24:34+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/56080.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/56080.html\",\"name\":\"8.13 JS\u6570\u636e\u7c7b\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-14T04:24:34+00:00\",\"dateModified\":\"2025-08-14T04:24:34+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/56080.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/56080.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/56080.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"8.13 JS\u6570\u636e\u7c7b\u578b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"8.13 JS\u6570\u636e\u7c7b\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/56080.html","og_locale":"zh_CN","og_type":"article","og_title":"8.13 JS\u6570\u636e\u7c7b\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb122\u6b21\u3002\u89e3\u91ca\uff1a\u53ef\u4ee5\u53d8\u5316\u7684\u91cf\u53d8\u91cf\u662f\u7528\u4e8e\u5b58\u50a8\u4fe1\u606f\u7684\u5bb9\u5668\u3010\u5185\u5b58\u7a7a\u95f4\u3011 \u53d8\u91cf\u662f\u4e00\u6bb5\u547d\u540d\u7684\u5b58\u50a8\u7a7a\u95f4 \u53d8\u91cf\u662f\u5728\u7a0b\u5e8f\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u503c\u5141\u8bb8\u6539\u53d8\u53d8\u91cf\u7684\u503c \u53d8\u91cf\u662f\u7531\u53d8\u91cf\u540d\uff0c\u53d8\u91cf\u503c\uff0c\u548c\u53d8\u91cf\u7c7b\u578b\u7ec4\u6210\uff0c\u8fd0\u7b97\u7b26\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/56080.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-14T04:24:34+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/56080.html","url":"https:\/\/www.wsisp.com\/helps\/56080.html","name":"8.13 JS\u6570\u636e\u7c7b\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-14T04:24:34+00:00","dateModified":"2025-08-14T04:24:34+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/56080.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/56080.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/56080.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"8.13 JS\u6570\u636e\u7c7b\u578b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/56080","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=56080"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/56080\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=56080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=56080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=56080"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=56080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}