{"id":426,"date":"2020-02-14T14:45:35","date_gmt":"2020-02-14T06:45:35","guid":{"rendered":"https:\/\/blog.cqdefxxx.com\/?p=426"},"modified":"2020-02-14T14:45:35","modified_gmt":"2020-02-14T06:45:35","slug":"%e5%8e%9f%e5%9e%8b%e9%93%be_%e5%b1%9e%e6%80%a7%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/blog.viter.top\/index.php\/2020\/02\/14\/%e5%8e%9f%e5%9e%8b%e9%93%be_%e5%b1%9e%e6%80%a7%e9%97%ae%e9%a2%98\/","title":{"rendered":"\u539f\u578b\u94fe_\u5c5e\u6027\u95ee\u9898"},"content":{"rendered":"<pre class=\"pure-highlightjs\"><code class=\"\">&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n  &lt;meta charset=\"UTF-8\"&gt;\n  &lt;title&gt;04_\u539f\u578b\u94fe_\u5c5e\u6027\u95ee\u9898&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;!--\n1. \u8bfb\u53d6\u5bf9\u8c61\u7684\u5c5e\u6027\u503c\u65f6: \u4f1a\u81ea\u52a8\u5230\u539f\u578b\u94fe\u4e2d\u67e5\u627e\n2. \u8bbe\u7f6e\u5bf9\u8c61\u7684\u5c5e\u6027\u503c\u65f6: \u4e0d\u4f1a\u67e5\u627e\u539f\u578b\u94fe, \u5982\u679c\u5f53\u524d\u5bf9\u8c61\u4e2d\u6ca1\u6709\u6b64\u5c5e\u6027, \u76f4\u63a5\u6dfb\u52a0\u6b64\u5c5e\u6027\u5e76\u8bbe\u7f6e\u5176\u503c\n3. \u65b9\u6cd5\u4e00\u822c\u5b9a\u4e49\u5728\u539f\u578b\u4e2d, \u5c5e\u6027\u4e00\u822c\u901a\u8fc7\u6784\u9020\u51fd\u6570\u5b9a\u4e49\u5728\u5bf9\u8c61\u672c\u8eab\u4e0a\n--&gt;\n&lt;script type=\"text\/javascript\"&gt;\n\n  function Fn() {\n\n  }\n  Fn.prototype.a = 'xxx'\n  var fn1 = new Fn()\n  console.log(fn1.a, fn1)\n\n  var fn2 = new Fn()\n  fn2.a = 'yyy'\n  console.log(fn1.a, fn2.a, fn2)\n\n  function Person(name, age) {\n    this.name = name\n    this.age = age\n  }\n  Person.prototype.setName = function (name) {\n    this.name = name\n  }\n  var p1 = new Person('Tom', 12)\n  p1.setName('Bob')\n  console.log(p1)\n\n  var p2 = new Person('Jack', 12)\n  p2.setName('Cat')\n  console.log(p2)\n  console.log(p1.__proto__===p2.__proto__) \/\/ true\n\n\n\n&lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt;!DOCTYPE html&gt; &lt;html lang=&#8221;en&#8221;&gt; &lt;head&gt; &lt;met","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[5],"_links":{"self":[{"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/posts\/426"}],"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=426"}],"version-history":[{"count":0,"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/posts\/426\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/media?parent=426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/categories?post=426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.viter.top\/index.php\/wp-json\/wp\/v2\/tags?post=426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}