{"id":281,"date":"2020-02-04T20:59:33","date_gmt":"2020-02-04T12:59:33","guid":{"rendered":"https:\/\/blog.cqdefxxx.com\/?p=281"},"modified":"2020-02-04T20:59:33","modified_gmt":"2020-02-04T12:59:33","slug":"%e7%9b%b8%e7%ad%89%e8%bf%90%e7%ae%97%e7%ac%a6","status":"publish","type":"post","link":"https:\/\/blog.viter.top\/index.php\/2020\/02\/04\/%e7%9b%b8%e7%ad%89%e8%bf%90%e7%ae%97%e7%ac%a6\/","title":{"rendered":"\u76f8\u7b49\u8fd0\u7b97\u7b26"},"content":{"rendered":"<pre class=\"pure-highlightjs\"><code class=\"\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n\t&lt;head&gt;\n\t\t&lt;meta charset=\"UTF-8\"&gt;\n\t\t&lt;title&gt;&lt;\/title&gt;\n\t\t&lt;script type=\"text\/javascript\"&gt;\n\t\t\t\n\t\t\t\/*\n\t\t\t * \u76f8\u7b49\u8fd0\u7b97\u7b26\u7528\u6765\u6bd4\u8f83\u4e24\u4e2a\u503c\u662f\u5426\u76f8\u7b49\uff0c\n\t\t\t * \t\u5982\u679c\u76f8\u7b49\u4f1a\u8fd4\u56detrue\uff0c\u5426\u5219\u8fd4\u56defalse\n\t\t\t * \n\t\t\t * \u4f7f\u7528 == \u6765\u505a\u76f8\u7b49\u8fd0\u7b97\n\t\t\t * \t- \u5f53\u4f7f\u7528==\u6765\u6bd4\u8f83\u4e24\u4e2a\u503c\u65f6\uff0c\u5982\u679c\u503c\u7684\u7c7b\u578b\u4e0d\u540c\uff0c\n\t\t\t * \t\t\u5219\u4f1a\u81ea\u52a8\u8fdb\u884c\u7c7b\u578b\u8f6c\u6362\uff0c\u5c06\u5176\u8f6c\u6362\u4e3a\u76f8\u540c\u7684\u7c7b\u578b\n\t\t\t * \t\t\u7136\u540e\u5728\u6bd4\u8f83\n\t\t\t * \u4e0d\u76f8\u7b49\n\t\t\t * \t \u4e0d\u76f8\u7b49\u7528\u6765\u5224\u65ad\u4e24\u4e2a\u503c\u662f\u5426\u4e0d\u76f8\u7b49\uff0c\u5982\u679c\u4e0d\u76f8\u7b49\u8fd4\u56detrue\uff0c\u5426\u5219\u8fd4\u56defalse\n\t\t\t * \t- \u4f7f\u7528 != \u6765\u505a\u4e0d\u76f8\u7b49\u8fd0\u7b97\n\t\t\t * \t- \u4e0d\u76f8\u7b49\u4e5f\u4f1a\u5bf9\u53d8\u91cf\u8fdb\u884c\u81ea\u52a8\u7684\u7c7b\u578b\u8f6c\u6362\uff0c\u5982\u679c\u8f6c\u6362\u540e\u76f8\u7b49\u5b83\u4e5f\u4f1a\u8fd4\u56defalse\n\t\t\t * \n\t\t\t * \t\t\n\t\t\t *  ===\n\t\t\t * \t\t\u5168\u7b49\n\t\t\t * \t\t- \u7528\u6765\u5224\u65ad\u4e24\u4e2a\u503c\u662f\u5426\u5168\u7b49\uff0c\u5b83\u548c\u76f8\u7b49\u7c7b\u4f3c\uff0c\u4e0d\u540c\u7684\u662f\u5b83\u4e0d\u4f1a\u505a\u81ea\u52a8\u7684\u7c7b\u578b\u8f6c\u6362\n\t\t\t * \t\t\t\u5982\u679c\u4e24\u4e2a\u503c\u7684\u7c7b\u578b\u4e0d\u540c\uff0c\u76f4\u63a5\u8fd4\u56defalse\n\t\t\t * \t!==\n\t\t\t * \t\t\u4e0d\u5168\u7b49\n\t\t\t * \t\t- \u7528\u6765\u5224\u65ad\u4e24\u4e2a\u503c\u662f\u5426\u4e0d\u5168\u7b49\uff0c\u548c\u4e0d\u7b49\u7c7b\u4f3c\uff0c\u4e0d\u540c\u7684\u662f\u5b83\u4e0d\u4f1a\u505a\u81ea\u52a8\u7684\u7c7b\u578b\u8f6c\u6362\n\t\t\t * \t\t\t\u5982\u679c\u4e24\u4e2a\u503c\u7684\u7c7b\u578b\u4e0d\u540c\uff0c\u76f4\u63a5\u8fd4\u56detrue\n\t\t\t *\/\n\t\t\t\n\t\t\t\/\/console.log(1 == 1); \/\/true\n\t\t\t\n\t\t\tvar a = 10;\n\t\t\t\n\t\t\t\/\/console.log(a == 4); \/\/false\n\t\t\t\n\t\t\t\/\/console.log(\"1\" == 1); \/\/true\n\t\t\t\n\t\t\t\/\/console.log(true == \"1\"); \/\/true\n\t\t\t\n\t\t\t\/\/console.log(null == 0); \/\/false\n\t\t\t\n\t\t\t\/*\n\t\t\t * undefined \u884d\u751f\u81ea null\n\t\t\t * \t\u6240\u4ee5\u8fd9\u4e24\u4e2a\u503c\u505a\u76f8\u7b49\u5224\u65ad\u65f6\uff0c\u4f1a\u8fd4\u56detrue\n\t\t\t *\/\n\t\t\t\/\/console.log(undefined == null);\n\t\t\t\n\t\t\t\/*\n\t\t\t * NaN\u4e0d\u548c\u4efb\u4f55\u503c\u76f8\u7b49\uff0c\u5305\u62ec\u4ed6\u672c\u8eab\n\t\t\t *\/\n\t\t\t\/\/console.log(NaN == NaN); \/\/false\n\t\t\t\n\t\t\tvar b = NaN;\n\t\t\t\n\t\t\t\/\/\u5224\u65adb\u7684\u503c\u662f\u5426\u662fNaN\n\t\t\t\/\/console.log(b == NaN);\n\t\t\t\/*\n\t\t\t * \u53ef\u4ee5\u901a\u8fc7isNaN()\u51fd\u6570\u6765\u5224\u65ad\u4e00\u4e2a\u503c\u662f\u5426\u662fNaN\n\t\t\t * \t\u5982\u679c\u8be5\u503c\u662fNaN\u5219\u8fd4\u56detrue\uff0c\u5426\u5219\u8fd4\u56defalse\n\t\t\t *\/\n\t\t\t\/\/console.log(isNaN(b));\n\t\t\t\n\t\t\t\/\/console.log(10 != 5); \/\/true\n\t\t\t\/\/console.log(10 != 10); \/\/false\n\t\t\t\/\/console.log(\"abcd\" != \"abcd\"); \/\/false\n\t\t\t\/\/console.log(\"1\" != 1);\/\/false\n\t\t\t\n\t\t\t\/\/console.log(\"123\" === 123);\/\/false\n\t\t\t\/\/console.log(null === undefined);\/\/false\n\t\t\t\n\t\t\tconsole.log(1 !== \"1\"); \/\/true\n\t\t\t\n\t\t\t\n\t\t&lt;\/script&gt;\n\t&lt;\/head&gt;\n\t&lt;body&gt;\n\t&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset= &#8230;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[4],"_links":{"self":[{"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/posts\/281"}],"collection":[{"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/comments?post=281"}],"version-history":[{"count":0,"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/posts\/281\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/media?parent=281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/categories?post=281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/tags?post=281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}