{"id":2108,"date":"2025-02-27T23:48:26","date_gmt":"2025-02-27T15:48:26","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=2108"},"modified":"2025-02-27T23:56:22","modified_gmt":"2025-02-27T15:56:22","slug":"javascript-html-dom-%e4%ba%8b%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2025\/02\/27\/javascript-html-dom-%e4%ba%8b%e4%bb%b6\/","title":{"rendered":"JavaScript HTML DOM \u4e8b\u4ef6"},"content":{"rendered":"\n<p>JavaScript \u4e2d\u7684\u4e8b\u4ef6\u662f\u7528\u6237\u4e0e\u7f51\u9875\u4ea4\u4e92\u7684\u65b9\u5f0f\uff0c\u4f8b\u5982\u70b9\u51fb\u6309\u94ae\u3001\u9f20\u6807\u79fb\u52a8\u3001\u952e\u76d8\u8f93\u5165\u7b49\u3002\u901a\u8fc7 JavaScript \u5904\u7406\u4e8b\u4ef6\uff0c\u80fd\u591f\u5728\u7528\u6237\u4e0e\u7f51\u9875\u4ea4\u4e92\u65f6\u89e6\u53d1\u76f8\u5e94\u7684\u4ee3\u7801\u6267\u884c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. \u4e8b\u4ef6\u7c7b\u578b<\/strong><\/h3>\n\n\n\n<p>\u5e38\u89c1\u7684\u4e8b\u4ef6\u7c7b\u578b\u5305\u62ec\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u9f20\u6807\u4e8b\u4ef6<\/strong>\uff1a<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>click<\/code>\uff1a\u9f20\u6807\u70b9\u51fb\u4e8b\u4ef6<\/li>\n\n\n\n<li><code>dblclick<\/code>\uff1a\u9f20\u6807\u53cc\u51fb\u4e8b\u4ef6<\/li>\n\n\n\n<li><code>mousedown<\/code>\uff1a\u9f20\u6807\u6309\u4e0b\u4e8b\u4ef6<\/li>\n\n\n\n<li><code>mouseup<\/code>\uff1a\u9f20\u6807\u677e\u5f00\u4e8b\u4ef6<\/li>\n\n\n\n<li><code>mousemove<\/code>\uff1a\u9f20\u6807\u79fb\u52a8\u4e8b\u4ef6<\/li>\n\n\n\n<li><code>mouseenter<\/code>\uff1a\u9f20\u6807\u8fdb\u5165\u5143\u7d20\u4e8b\u4ef6<\/li>\n\n\n\n<li><code>mouseleave<\/code>\uff1a\u9f20\u6807\u79bb\u5f00\u5143\u7d20\u4e8b\u4ef6<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u952e\u76d8\u4e8b\u4ef6<\/strong>\uff1a<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>keydown<\/code>\uff1a\u6309\u4e0b\u952e\u76d8\u4e0a\u7684\u952e<\/li>\n\n\n\n<li><code>keyup<\/code>\uff1a\u91ca\u653e\u952e\u76d8\u4e0a\u7684\u952e<\/li>\n\n\n\n<li><code>keypress<\/code>\uff1a\u6309\u4e0b\u952e\u76d8\u4e0a\u7684\u5b57\u7b26\u952e<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u8868\u5355\u4e8b\u4ef6<\/strong>\uff1a<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>submit<\/code>\uff1a\u8868\u5355\u63d0\u4ea4\u4e8b\u4ef6<\/li>\n\n\n\n<li><code>focus<\/code>\uff1a\u8f93\u5165\u6846\u83b7\u5f97\u7126\u70b9\u4e8b\u4ef6<\/li>\n\n\n\n<li><code>blur<\/code>\uff1a\u8f93\u5165\u6846\u5931\u53bb\u7126\u70b9\u4e8b\u4ef6<\/li>\n\n\n\n<li><code>change<\/code>\uff1a\u8868\u5355\u5143\u7d20\u503c\u53d1\u751f\u53d8\u5316\u65f6\u89e6\u53d1<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u7a97\u53e3\u4e8b\u4ef6<\/strong>\uff1a<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>load<\/code>\uff1a\u9875\u9762\u6216\u5143\u7d20\u52a0\u8f7d\u5b8c\u6210\u540e\u89e6\u53d1<\/li>\n\n\n\n<li><code>resize<\/code>\uff1a\u7a97\u53e3\u5927\u5c0f\u8c03\u6574\u4e8b\u4ef6<\/li>\n\n\n\n<li><code>scroll<\/code>\uff1a\u7a97\u53e3\u6eda\u52a8\u4e8b\u4ef6<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u5176\u4ed6\u4e8b\u4ef6<\/strong>\uff1a<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>input<\/code>\uff1a\u8f93\u5165\u6846\u5185\u5bb9\u53d8\u5316\u65f6\u89e6\u53d1<\/li>\n\n\n\n<li><code>focusin<\/code>\uff1a\u83b7\u53d6\u7126\u70b9\u4e8b\u4ef6\uff08\u4e8b\u4ef6\u5192\u6ce1\u7248\uff09<\/li>\n\n\n\n<li><code>focusout<\/code>\uff1a\u5931\u53bb\u7126\u70b9\u4e8b\u4ef6\uff08\u4e8b\u4ef6\u5192\u6ce1\u7248\uff09<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. \u4e8b\u4ef6\u7ed1\u5b9a<\/strong><\/h3>\n\n\n\n<p>\u6709\u51e0\u79cd\u65b9\u5f0f\u53ef\u4ee5\u5728 JavaScript \u4e2d\u7ed1\u5b9a\u4e8b\u4ef6\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>(1) \u4f7f\u7528 <code>onclick<\/code> \u5c5e\u6027<\/strong><\/h4>\n\n\n\n<p>\u5728 HTML \u5143\u7d20\u4e2d\u76f4\u63a5\u901a\u8fc7 <code>onclick<\/code> \u5c5e\u6027\u7ed1\u5b9a\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;button onclick=\"alert('Button clicked!')\"&gt;Click Me!&lt;\/button&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>(2) \u4f7f\u7528 <code>addEventListener()<\/code> \u65b9\u6cd5<\/strong><\/h4>\n\n\n\n<p><code>addEventListener()<\/code> \u662f\u66f4\u63a8\u8350\u7684\u4e8b\u4ef6\u7ed1\u5b9a\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u540c\u65f6\u4e3a\u4e00\u4e2a\u5143\u7d20\u7ed1\u5b9a\u591a\u4e2a\u4e8b\u4ef6\u5904\u7406\u7a0b\u5e8f\uff0c\u5e76\u652f\u6301\u4e8b\u4ef6\u5192\u6ce1\u548c\u6355\u83b7\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;button id=\"btn\"&gt;Click Me!&lt;\/button&gt;\n\n&lt;script&gt;\n  const btn = document.getElementById('btn');\n\n  \/\/ \u4e3a\u6309\u94ae\u7ed1\u5b9a\u70b9\u51fb\u4e8b\u4ef6\n  btn.addEventListener('click', function() {\n    alert('Button clicked!');\n  });\n&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>(3) \u4f7f\u7528 <code>on&lt;Event&gt;<\/code> \u5c5e\u6027<\/strong><\/h4>\n\n\n\n<p>\u5728 JavaScript \u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u76f4\u63a5\u8bbf\u95ee\u5143\u7d20\u7684 <code>on&lt;Event&gt;<\/code> \u5c5e\u6027\u6765\u7ed1\u5b9a\u4e8b\u4ef6\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;button id=\"btn\"&gt;Click Me!&lt;\/button&gt;\n\n&lt;script&gt;\n  const btn = document.getElementById('btn');\n\n  \/\/ \u4f7f\u7528 onClick \u4e8b\u4ef6\u7ed1\u5b9a\n  btn.onclick = function() {\n    alert('Button clicked!');\n  };\n&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. \u4e8b\u4ef6\u5bf9\u8c61<\/strong><\/h3>\n\n\n\n<p>\u4e8b\u4ef6\u5bf9\u8c61\u662f\u5f53\u4e8b\u4ef6\u53d1\u751f\u65f6\uff0c\u6d4f\u89c8\u5668\u81ea\u52a8\u4f20\u9012\u7ed9\u4e8b\u4ef6\u5904\u7406\u7a0b\u5e8f\u7684\u4e00\u4e2a\u5bf9\u8c61\u3002\u8fd9\u4e2a\u5bf9\u8c61\u5305\u542b\u5173\u4e8e\u4e8b\u4ef6\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5982\u89e6\u53d1\u4e8b\u4ef6\u7684\u5143\u7d20\u3001\u4e8b\u4ef6\u7c7b\u578b\u3001\u9f20\u6807\u4f4d\u7f6e\u7b49\u3002<\/p>\n\n\n\n<p>\u5e38\u89c1\u7684\u4e8b\u4ef6\u5bf9\u8c61\u5c5e\u6027\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>target<\/strong>\uff1a\u89e6\u53d1\u4e8b\u4ef6\u7684\u5143\u7d20<\/li>\n\n\n\n<li><strong>type<\/strong>\uff1a\u4e8b\u4ef6\u7c7b\u578b\uff08\u4f8b\u5982 <code>click<\/code>\u3001<code>keydown<\/code>\uff09<\/li>\n\n\n\n<li><strong>keyCode<\/strong>\uff1a\u5f53\u6309\u952e\u4e8b\u4ef6\u89e6\u53d1\u65f6\uff0c\u8868\u793a\u6309\u952e\u7684\u952e\u503c<\/li>\n\n\n\n<li><strong>clientX<\/strong> \u548c <strong>clientY<\/strong>\uff1a\u9f20\u6807\u70b9\u51fb\u4f4d\u7f6e\u7684 X \u548c Y \u5750\u6807\uff08\u76f8\u5bf9\u4e8e\u6d4f\u89c8\u5668\u89c6\u53e3\uff09<\/li>\n\n\n\n<li><strong>preventDefault()<\/strong>\uff1a\u963b\u6b62\u4e8b\u4ef6\u7684\u9ed8\u8ba4\u884c\u4e3a\uff0c\u4f8b\u5982\u53d6\u6d88\u8868\u5355\u63d0\u4ea4<\/li>\n\n\n\n<li><strong>stopPropagation()<\/strong>\uff1a\u963b\u6b62\u4e8b\u4ef6\u7684\u4f20\u64ad\uff08\u5192\u6ce1\u6216\u6355\u83b7\uff09<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;button id=\"btn\"&gt;Click Me!&lt;\/button&gt;\n\n&lt;script&gt;\n  const btn = document.getElementById('btn');\n\n  btn.addEventListener('click', function(event) {\n    console.log('Event Type:', event.type);  \/\/ \u8f93\u51fa\u4e8b\u4ef6\u7c7b\u578b\n    console.log('Button clicked at:', event.clientX, event.clientY);  \/\/ \u8f93\u51fa\u9f20\u6807\u70b9\u51fb\u4f4d\u7f6e\n  });\n&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. \u4e8b\u4ef6\u5192\u6ce1\u4e0e\u4e8b\u4ef6\u6355\u83b7<\/strong><\/h3>\n\n\n\n<p>\u4e8b\u4ef6\u5192\u6ce1\u548c\u4e8b\u4ef6\u6355\u83b7\u662f DOM \u4e8b\u4ef6\u4f20\u64ad\u7684\u4e24\u79cd\u65b9\u5f0f\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4e8b\u4ef6\u5192\u6ce1<\/strong>\uff1a\u4e8b\u4ef6\u4ece\u76ee\u6807\u5143\u7d20\u5f00\u59cb\uff0c\u9010\u5c42\u5411\u4e0a\u5192\u6ce1\u5230 <code>document<\/code>\u3002<\/li>\n\n\n\n<li><strong>\u4e8b\u4ef6\u6355\u83b7<\/strong>\uff1a\u4e8b\u4ef6\u4ece\u6700\u5916\u5c42\u5143\u7d20\uff08\u5982 <code>document<\/code>\uff09\u5f00\u59cb\uff0c\u9010\u5c42\u5411\u4e0b\u6355\u83b7\uff0c\u76f4\u5230\u76ee\u6807\u5143\u7d20\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u4e8b\u4ef6\u662f\u901a\u8fc7\u5192\u6ce1\u4f20\u64ad\u7684\u3002\u5982\u679c\u5e0c\u671b\u4f7f\u7528\u6355\u83b7\u673a\u5236\uff0c\u53ef\u4ee5\u5728 <code>addEventListener()<\/code> \u65b9\u6cd5\u4e2d\u8bbe\u7f6e\u7b2c\u4e09\u4e2a\u53c2\u6570\u4e3a <code>true<\/code>\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div id=\"parent\"&gt;\n  &lt;button id=\"child\"&gt;Click Me!&lt;\/button&gt;\n&lt;\/div&gt;\n\n&lt;script&gt;\n  const parent = document.getElementById('parent');\n  const child = document.getElementById('child');\n\n  \/\/ \u6355\u83b7\u9636\u6bb5\n  parent.addEventListener('click', function() {\n    alert('Parent clicked during capture!');\n  }, true);\n\n  \/\/ \u5192\u6ce1\u9636\u6bb5\n  child.addEventListener('click', function() {\n    alert('Child clicked!');\n  });\n&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>parent<\/code> \u76d1\u542c\u5668\u7684 <code>true<\/code> \u53c2\u6570\u4f7f\u5f97\u5b83\u5728\u4e8b\u4ef6\u6355\u83b7\u9636\u6bb5\u89e6\u53d1\uff0c\u800c <code>child<\/code> \u76d1\u542c\u5668\u5728\u4e8b\u4ef6\u5192\u6ce1\u9636\u6bb5\u89e6\u53d1\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. \u79fb\u9664\u4e8b\u4ef6\u76d1\u542c<\/strong><\/h3>\n\n\n\n<p>\u5982\u679c\u4f60\u5e0c\u671b\u79fb\u9664\u5df2\u7ecf\u7ed1\u5b9a\u7684\u4e8b\u4ef6\u76d1\u542c\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>removeEventListener()<\/code> \u65b9\u6cd5\u3002\u4f60\u9700\u8981\u786e\u4fdd\u4f20\u9012\u7ed9 <code>removeEventListener()<\/code> \u7684\u4e8b\u4ef6\u7c7b\u578b\u548c\u56de\u8c03\u51fd\u6570\u4e0e <code>addEventListener()<\/code> \u4e2d\u76f8\u540c\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;button id=\"btn\"&gt;Click Me!&lt;\/button&gt;\n\n&lt;script&gt;\n  const btn = document.getElementById('btn');\n\n  function handleClick() {\n    alert('Button clicked!');\n  }\n\n  \/\/ \u7ed1\u5b9a\u4e8b\u4ef6\n  btn.addEventListener('click', handleClick);\n\n  \/\/ \u79fb\u9664\u4e8b\u4ef6\n  btn.removeEventListener('click', handleClick);\n&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. \u4e8b\u4ef6\u59d4\u6258<\/strong><\/h3>\n\n\n\n<p>\u4e8b\u4ef6\u59d4\u6258\u662f\u5c06\u4e8b\u4ef6\u76d1\u542c\u5668\u7ed1\u5b9a\u5230\u7236\u5143\u7d20\uff0c\u800c\u4e0d\u662f\u5b50\u5143\u7d20\u7684\u6280\u672f\u3002\u8fd9\u4f7f\u5f97\u4f60\u53ef\u4ee5\u51cf\u5c11\u4e8b\u4ef6\u5904\u7406\u7a0b\u5e8f\u7684\u6570\u91cf\uff0c\u5e76\u4e14\u52a8\u6001\u6dfb\u52a0\u7684\u65b0\u5143\u7d20\u4e5f\u80fd\u591f\u54cd\u5e94\u4e8b\u4ef6\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;ul id=\"list\"&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\n&lt;script&gt;\n  const list = document.getElementById('list');\n\n  \/\/ \u901a\u8fc7\u4e8b\u4ef6\u59d4\u6258\u76d1\u542c\u5b50\u5143\u7d20\u7684\u70b9\u51fb\u4e8b\u4ef6\n  list.addEventListener('click', function(event) {\n    if (event.target.tagName === 'LI') {\n      alert('Item clicked: ' + event.target.textContent);\n    }\n  });\n&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06\u4e8b\u4ef6\u76d1\u542c\u5668\u7ed1\u5b9a\u5230\u7236\u5143\u7d20 <code>ul<\/code>\uff0c\u901a\u8fc7\u68c0\u67e5 <code>event.target<\/code> \u6765\u5224\u65ad\u70b9\u51fb\u7684\u662f\u54ea\u4e2a <code>li<\/code> \u5143\u7d20\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u603b\u7ed3<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4e8b\u4ef6\u7c7b\u578b<\/strong>\uff1a\u5e38\u89c1\u7684\u9f20\u6807\u3001\u952e\u76d8\u3001\u8868\u5355\u548c\u7a97\u53e3\u4e8b\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u4e8b\u4ef6\u7ed1\u5b9a<\/strong>\uff1a\u4f7f\u7528 <code>addEventListener()<\/code> \u662f\u63a8\u8350\u7684\u65b9\u5f0f\uff0c\u5b83\u652f\u6301\u7ed1\u5b9a\u591a\u4e2a\u4e8b\u4ef6\u548c\u4f7f\u7528\u4e8b\u4ef6\u6355\u83b7\u3002<\/li>\n\n\n\n<li><strong>\u4e8b\u4ef6\u5bf9\u8c61<\/strong>\uff1a\u5305\u542b\u5173\u4e8e\u4e8b\u4ef6\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5982\u76ee\u6807\u5143\u7d20\u3001\u4e8b\u4ef6\u7c7b\u578b\u3001\u9f20\u6807\u4f4d\u7f6e\u7b49\u3002<\/li>\n\n\n\n<li><strong>\u4e8b\u4ef6\u4f20\u64ad<\/strong>\uff1a\u5305\u62ec\u4e8b\u4ef6\u5192\u6ce1\u548c\u4e8b\u4ef6\u6355\u83b7\uff0c\u4f7f\u7528 <code>addEventListener()<\/code> \u7684\u7b2c\u4e09\u4e2a\u53c2\u6570\u53ef\u4ee5\u63a7\u5236\u4f20\u64ad\u65b9\u5f0f\u3002<\/li>\n\n\n\n<li><strong>\u79fb\u9664\u4e8b\u4ef6\u76d1\u542c<\/strong>\uff1a\u4f7f\u7528 <code>removeEventListener()<\/code> \u79fb\u9664\u7ed1\u5b9a\u7684\u4e8b\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u4e8b\u4ef6\u59d4\u6258<\/strong>\uff1a\u901a\u8fc7\u5c06\u4e8b\u4ef6\u7ed1\u5b9a\u5230\u7236\u5143\u7d20\uff0c\u4f7f\u5f97\u6240\u6709\u5b50\u5143\u7d20\uff08\u5305\u62ec\u52a8\u6001\u6dfb\u52a0\u7684\u5143\u7d20\uff09\u4e5f\u80fd\u54cd\u5e94\u4e8b\u4ef6\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u901a\u8fc7\u8fd9\u4e9b\u4e8b\u4ef6\u5904\u7406\u6280\u672f\uff0c\u4f60\u53ef\u4ee5\u66f4\u597d\u5730\u63a7\u5236\u7f51\u9875\u4e2d\u7684\u4ea4\u4e92\u884c\u4e3a\uff0c\u63d0\u4f9b\u66f4\u52a0\u4e30\u5bcc\u548c\u52a8\u6001\u7684\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n\n\n\n<p>\u66f4\u591a\u8be6\u7ec6\u5185\u5bb9\u8bf7\u5173\u6ce8\u5176\u4ed6\u76f8\u5173\u6587\u7ae0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript \u4e2d\u7684\u4e8b\u4ef6\u662f\u7528\u6237\u4e0e\u7f51\u9875\u4ea4\u4e92\u7684\u65b9\u5f0f\uff0c\u4f8b\u5982\u70b9\u51fb\u6309\u94ae\u3001\u9f20\u6807\u79fb\u52a8\u3001\u952e\u76d8\u8f93\u5165\u7b49\u3002\u901a\u8fc7 JavaScr [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[],"class_list":["post-2108","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/2108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/comments?post=2108"}],"version-history":[{"count":2,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/2108\/revisions"}],"predecessor-version":[{"id":2120,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/2108\/revisions\/2120"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=2108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=2108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=2108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}