{"id":1412,"date":"2025-02-08T00:19:53","date_gmt":"2025-02-07T16:19:53","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=1412"},"modified":"2025-02-08T00:19:54","modified_gmt":"2025-02-07T16:19:54","slug":"%e9%a1%b9%e7%9b%ae%e5%ae%9e%e8%b7%b5%ef%bc%9a%e6%9e%84%e5%bb%ba%e5%ae%9e%e9%99%85-javascript-%e9%a1%b9%e7%9b%ae%e6%8f%90%e5%8d%87%e7%bc%96%e7%a8%8b%e6%8a%80%e8%83%bd","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2025\/02\/08\/%e9%a1%b9%e7%9b%ae%e5%ae%9e%e8%b7%b5%ef%bc%9a%e6%9e%84%e5%bb%ba%e5%ae%9e%e9%99%85-javascript-%e9%a1%b9%e7%9b%ae%e6%8f%90%e5%8d%87%e7%bc%96%e7%a8%8b%e6%8a%80%e8%83%bd\/","title":{"rendered":"\u9879\u76ee\u5b9e\u8df5\uff1a\u6784\u5efa\u5b9e\u9645 JavaScript \u9879\u76ee\u63d0\u5347\u7f16\u7a0b\u6280\u80fd"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u9879\u76ee\u5b9e\u8df5\uff0c\u4f60\u5c06\u66f4\u597d\u5730\u7406\u89e3 JavaScript \u7684\u5e94\u7528\uff0c\u5e76\u63d0\u5347\u5b9e\u9645\u5f00\u53d1\u80fd\u529b\u3002\u672c\u7ae0\u8282\u5c06\u5e26\u4f60\u4e00\u6b65\u6b65\u5b8c\u6210\u591a\u4e2a\u9879\u76ee\uff0c\u4ece\u7b80\u5355\u7684\u7f51\u9875\u5e94\u7528\u5230\u540e\u7aef\u5f00\u53d1\uff0c\u5e2e\u52a9\u4f60\u5de9\u56fa\u6240\u5b66\u7684 JavaScript \u6280\u80fd\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">1. <strong>\u6784\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u7f51\u9875\u5e94\u7528<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u6784\u5efa\u4e00\u4e2a\u5f85\u529e\u4e8b\u9879\u5e94\u7528\uff08To-do List\uff09\uff0c\u4f60\u5c06\u638c\u63e1\u5982\u4f55\u4f7f\u7528 JavaScript \u548c DOM \u64cd\u4f5c\u5b9e\u73b0\u7528\u6237\u4ea4\u4e92\u3001\u6570\u636e\u5b58\u50a8\u548c\u7f51\u9875\u66f4\u65b0\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u5b9e\u73b0\u5f85\u529e\u4e8b\u9879\u5e94\u7528\uff08To-do List\uff09<\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u529f\u80fd\u8981\u6c42<\/strong>\uff1a<\/li>\n\n\n\n<li>\u7528\u6237\u53ef\u4ee5\u6dfb\u52a0\u3001\u7f16\u8f91\u3001\u5220\u9664\u5f85\u529e\u4e8b\u9879\u3002<\/li>\n\n\n\n<li>\u7528\u6237\u53ef\u4ee5\u6807\u8bb0\u4efb\u52a1\u662f\u5426\u5b8c\u6210\u3002<\/li>\n\n\n\n<li>\u6570\u636e\u6301\u4e45\u5316\uff08\u4f7f\u7528 localStorage \u5b58\u50a8\u4efb\u52a1\u6570\u636e\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>&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;To-do List&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;h1&gt;To-do List&lt;\/h1&gt;\n  &lt;input type=\"text\" id=\"taskInput\" placeholder=\"Enter a new task\"&gt;\n  &lt;button onclick=\"addTask()\"&gt;Add Task&lt;\/button&gt;\n  &lt;ul id=\"taskList\"&gt;&lt;\/ul&gt;\n\n  &lt;script&gt;\n    \/\/ \u83b7\u53d6\u4efb\u52a1\u5217\u8868\u548c\u8f93\u5165\u6846\u5143\u7d20\n    const taskList = document.getElementById('taskList');\n    const taskInput = document.getElementById('taskInput');\n\n    \/\/ \u4ece localStorage \u83b7\u53d6\u5df2\u4fdd\u5b58\u7684\u4efb\u52a1\n    const tasks = JSON.parse(localStorage.getItem('tasks')) || &#91;];\n\n    \/\/ \u6e32\u67d3\u4efb\u52a1\u5217\u8868\n    function renderTasks() {\n      taskList.innerHTML = '';\n      tasks.forEach((task, index) =&gt; {\n        const li = document.createElement('li');\n        li.innerHTML = `${task.text} &lt;button onclick=\"deleteTask(${index})\"&gt;Delete&lt;\/button&gt;`;\n        taskList.appendChild(li);\n      });\n    }\n\n    \/\/ \u6dfb\u52a0\u65b0\u4efb\u52a1\n    function addTask() {\n      if (taskInput.value.trim() !== '') {\n        tasks.push({ text: taskInput.value });\n        localStorage.setItem('tasks', JSON.stringify(tasks));\n        taskInput.value = '';\n        renderTasks();\n      }\n    }\n\n    \/\/ \u5220\u9664\u4efb\u52a1\n    function deleteTask(index) {\n      tasks.splice(index, 1);\n      localStorage.setItem('tasks', JSON.stringify(tasks));\n      renderTasks();\n    }\n\n    \/\/ \u521d\u59cb\u6e32\u67d3\u4efb\u52a1\u5217\u8868\n    renderTasks();\n  &lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u7b80\u5355\u7684\u5e94\u7528\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528 JavaScript \u548c DOM \u64cd\u4f5c\u6784\u5efa\u4e92\u52a8\u9875\u9762\uff0c\u5e76\u7ed3\u5408 <code>localStorage<\/code> \u5b9e\u73b0\u6570\u636e\u6301\u4e45\u5316\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">2. <strong>\u4f7f\u7528 Ajax \u83b7\u53d6\u548c\u663e\u793a\u6570\u636e<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7 Ajax\uff0c\u4f60\u53ef\u4ee5\u5b9e\u73b0\u4e0e\u670d\u52a1\u5668\u7684\u5f02\u6b65\u901a\u4fe1\uff0c\u5e76\u5c06\u83b7\u53d6\u7684\u6570\u636e\u52a8\u6001\u66f4\u65b0\u5230\u7f51\u9875\u4e0a\uff0c\u800c\u65e0\u9700\u91cd\u65b0\u52a0\u8f7d\u9875\u9762\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u5b9e\u73b0 Ajax \u8bf7\u6c42<\/strong><\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528\u539f\u751f JavaScript \u7684 <code>XMLHttpRequest<\/code> \u6216\u73b0\u4ee3\u7684 <code>fetch()<\/code> \u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u4ece\u670d\u52a1\u5668\u8bf7\u6c42\u6570\u636e\uff0c\u5e76\u901a\u8fc7 DOM \u64cd\u4f5c\u5c06\u6570\u636e\u663e\u793a\u5728\u7f51\u9875\u4e0a\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u4f7f\u7528 fetch() \u8bf7\u6c42\u6570\u636e\nfetch('https:\/\/jsonplaceholder.typicode.com\/posts')\n  .then(response =&gt; response.json())\n  .then(data =&gt; {\n    const postList = document.getElementById('postList');\n    data.forEach(post =&gt; {\n      const li = document.createElement('li');\n      li.textContent = post.title;\n      postList.appendChild(li);\n    });\n  })\n  .catch(error =&gt; console.error('Error:', error));<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;ul id=\"postList\"&gt;&lt;\/ul&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b64\u4ee3\u7801\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u901a\u8fc7 Ajax \u83b7\u53d6\u6570\u636e\u5e76\u52a8\u6001\u66f4\u65b0\u7f51\u9875\u5185\u5bb9\uff0c\u9002\u7528\u4e8e\u4ece API \u83b7\u53d6\u6570\u636e\u5e76\u5c55\u793a\u7684\u573a\u666f\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">3. <strong>\u4e0e\u670d\u52a1\u5668\u4ea4\u4e92\uff08\u901a\u8fc7 REST API\uff09<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u53ef\u4ee5\u901a\u8fc7 RESTful API \u4e0e\u540e\u7aef\u8fdb\u884c\u6570\u636e\u4ea4\u4e92\u3002\u73b0\u4ee3 JavaScript \u63d0\u4f9b\u4e86 <code>fetch()<\/code> \u548c <code>Axios<\/code> \u7b49\u5e93\uff0c\u4f7f\u4e0e\u670d\u52a1\u5668\u7684\u901a\u4fe1\u66f4\u52a0\u7b80\u4fbf\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u901a\u8fc7 REST API \u83b7\u53d6\u6570\u636e<\/strong><\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">\u5047\u8bbe\u4f60\u6709\u4e00\u4e2a REST API\uff0c\u5b83\u63d0\u4f9b\u4e86\u5f85\u529e\u4e8b\u9879\u7684 CRUD\uff08\u521b\u5efa\u3001\u8bfb\u53d6\u3001\u66f4\u65b0\u3001\u5220\u9664\uff09\u64cd\u4f5c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u83b7\u53d6\u5f85\u529e\u4e8b\u9879\u5217\u8868\nfetch('https:\/\/api.example.com\/todos')\n  .then(response =&gt; response.json())\n  .then(data =&gt; console.log(data));<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u53d1\u9001 POST \u8bf7\u6c42\u521b\u5efa\u65b0\u4efb\u52a1<\/strong><\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u521b\u5efa\u65b0\u4efb\u52a1\nconst newTask = { text: \"New task\" };\n\nfetch('https:\/\/api.example.com\/todos', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application\/json',\n  },\n  body: JSON.stringify(newTask),\n})\n  .then(response =&gt; response.json())\n  .then(data =&gt; console.log(data));<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u4e0e\u670d\u52a1\u5668\u7684\u4ea4\u4e92\uff0c\u4f60\u80fd\u591f\u6784\u5efa\u66f4\u590d\u6742\u7684\u52a8\u6001\u7f51\u9875\uff0c\u589e\u5f3a\u5e94\u7528\u7684\u529f\u80fd\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">4. <strong>\u6784\u5efa\u4e00\u4e2a\u4e92\u52a8\u7f51\u9875<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e92\u52a8\u7f51\u9875\u4e0d\u4ec5\u4ec5\u662f\u5c55\u793a\u4fe1\u606f\uff0c\u8fd8\u9700\u8981\u6839\u636e\u7528\u6237\u64cd\u4f5c\u5b9e\u65f6\u66f4\u65b0\u9875\u9762\u5185\u5bb9\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u4f7f\u7528 DOM \u52a8\u6001\u66f4\u65b0\u7f51\u9875\u5185\u5bb9<\/strong><\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">JavaScript \u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684 API \u7528\u4e8e\u52a8\u6001\u66f4\u65b0\u7f51\u9875\u5185\u5bb9\u3002\u4f8b\u5982\uff0c\u901a\u8fc7\u4e8b\u4ef6\u76d1\u542c\u5668\u6355\u6349\u7528\u6237\u8f93\u5165\u6216\u70b9\u51fb\u4e8b\u4ef6\uff0c\u7136\u540e\u4fee\u6539 DOM \u5185\u5bb9\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>document.getElementById('button').addEventListener('click', () =&gt; {\n  document.getElementById('message').textContent = 'Button clicked!';\n});<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u5236\u4f5c\u56fe\u5f62\u754c\u9762\u548c\u52a8\u753b\uff08CSS + JS\uff09<\/strong><\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">JavaScript \u4e0e CSS \u7ed3\u5408\uff0c\u53ef\u4ee5\u5236\u4f5c\u5404\u79cd\u52a8\u753b\u6548\u679c\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528 <code>requestAnimationFrame()<\/code> \u6765\u5b9e\u73b0\u5e73\u6ed1\u7684\u52a8\u753b\u6548\u679c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>let startTime;\n\nfunction animate(time) {\n  if (!startTime) startTime = time;\n  const progress = time - startTime;\n\n  \/\/ \u52a8\u753b\u903b\u8f91\n  document.getElementById('box').style.transform = `translateX(${progress \/ 10}px)`;\n\n  if (progress &lt; 1000) {\n    requestAnimationFrame(animate);\n  }\n}\n\nrequestAnimationFrame(animate);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u52a8\u753b\u4f1a\u5728 1 \u79d2\u949f\u5185\u5c06\u4e00\u4e2a\u5143\u7d20\u4ece\u5c4f\u5e55\u7684\u5de6\u4fa7\u79fb\u52a8\u5230\u53f3\u4fa7\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">5. <strong>\u4f7f\u7528 Node.js \u505a\u540e\u7aef\u5f00\u53d1<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Node.js \u662f\u4e00\u4e2a\u5f3a\u5927\u7684 JavaScript \u8fd0\u884c\u73af\u5883\uff0c\u4f7f\u5f97\u5f00\u53d1\u8005\u80fd\u591f\u4f7f\u7528 JavaScript \u7f16\u5199\u540e\u7aef\u4ee3\u7801\u3002\u901a\u8fc7\u4f7f\u7528 Node.js\uff0c\u4f60\u53ef\u4ee5\u521b\u5efa\u670d\u52a1\u5668\u3001\u5904\u7406\u8bf7\u6c42\u5e76\u4e0e\u6570\u636e\u5e93\u4ea4\u4e92\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u642d\u5efa\u7b80\u5355\u7684 Node.js \u670d\u52a1\u5668<\/strong><\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>const http = require('http');\n\nconst server = http.createServer((req, res) =&gt; {\n  res.writeHead(200, { 'Content-Type': 'text\/plain' });\n  res.end('Hello, Node.js!');\n});\n\nserver.listen(3000, () =&gt; {\n  console.log('Server is running on http:\/\/localhost:3000');\n});<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u7b80\u5355\u7684 Node.js \u670d\u52a1\u5668\u4f1a\u5728 <code>localhost:3000<\/code> \u4e0a\u8fd0\u884c\uff0c\u54cd\u5e94\u6bcf\u4e2a\u8bf7\u6c42\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">6. <strong>\u4f7f\u7528 Express.js \u6846\u67b6\u6784\u5efa API<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Express.js \u662f Node.js \u4e0a\u7684\u4e00\u4e2a\u6d41\u884c\u6846\u67b6\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u8f7b\u677e\u5730\u6784\u5efa API \u548c\u8def\u7531\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const express = require('express');\nconst app = express();\nconst port = 3000;\n\napp.get('\/todos', (req, res) =&gt; {\n  res.json(&#91;{ id: 1, text: 'Learn JavaScript' }]);\n});\n\napp.listen(port, () =&gt; {\n  console.log(`Server is running on http:\/\/localhost:${port}`);\n});<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u7b80\u5355\u7684 API \u8fd4\u56de\u4e00\u4e2a\u5305\u542b\u5f85\u529e\u4e8b\u9879\u7684 JSON \u6570\u636e\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">7. <strong>\u4e0e\u6570\u636e\u5e93\u4ea4\u4e92\uff08\u4f8b\u5982 MongoDB\uff09<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Node.js \u548c Express \u53ef\u4ee5\u4e0e\u6570\u636e\u5e93\u8fdb\u884c\u4ea4\u4e92\uff0cMongoDB \u662f\u4e00\u4e2a\u5e38\u7528\u7684 NoSQL \u6570\u636e\u5e93\uff0c\u9002\u5408\u4e0e Node.js \u4e00\u8d77\u4f7f\u7528\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u4e0e MongoDB \u8fdb\u884c\u4ea4\u4e92<\/strong><\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">\u9996\u5148\uff0c\u5b89\u88c5 <code>mongoose<\/code> \u5e93\u6765\u7b80\u5316\u4e0e MongoDB \u7684\u4ea4\u4e92\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install mongoose<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7 <code>mongoose<\/code> \u8fde\u63a5\u5230\u6570\u636e\u5e93\uff0c\u5e76\u6267\u884c\u57fa\u672c\u7684 CRUD \u64cd\u4f5c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const mongoose = require('mongoose');\n\nmongoose.connect('mongodb:\/\/localhost\/todolist', { useNewUrlParser: true, useUnifiedTopology: true });\n\nconst taskSchema = new mongoose.Schema({ text: String });\nconst Task = mongoose.model('Task', taskSchema);\n\n\/\/ \u83b7\u53d6\u6240\u6709\u4efb\u52a1\nTask.find().then(tasks =&gt; console.log(tasks));\n\n\/\/ \u6dfb\u52a0\u65b0\u4efb\u52a1\nconst newTask = new Task({ text: 'Learn MongoDB' });\nnewTask.save().then(() =&gt; console.log('Task saved!'));<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7 Node.js \u548c MongoDB\uff0c\u4f60\u53ef\u4ee5\u6784\u5efa\u4e00\u4e2a\u5168\u6808 JavaScript \u5e94\u7528\uff0c\u652f\u6301\u52a8\u6001\u6570\u636e\u5b58\u50a8\u548c\u7ba1\u7406\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u5c0f\u7ed3<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8fd9\u4e00\u7ae0\u8282\u4e2d\uff0c\u4f60\u901a\u8fc7\u591a\u4e2a\u5b9e\u8df5\u9879\u76ee\uff0c\u638c\u63e1\u4e86 JavaScript \u5728\u524d\u7aef\u548c\u540e\u7aef\u5f00\u53d1\u4e2d\u7684\u5b9e\u9645\u5e94\u7528\u3002\u4f60\u5b66\u4f1a\u4e86\u5982\u4f55\u6784\u5efa\u7b80\u5355\u7684\u7f51\u9875\u5e94\u7528\u3001\u5982\u4f55\u4e0e\u670d\u52a1\u5668\u4ea4\u4e92\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528 Node.js \u505a\u540e\u7aef\u5f00\u53d1\uff0c\u771f\u6b63\u5c06\u6240\u5b66\u7684\u7406\u8bba\u77e5\u8bc6\u5e94\u7528\u5230\u5b9e\u9645\u5f00\u53d1\u4e2d\u3002\u8fd9\u4e9b\u9879\u76ee\u5b9e\u8df5\u5c06\u4e3a\u4f60\u6210\u4e3a\u4e00\u540d\u5168\u6808 JavaScript \u5f00\u53d1\u8005\u5960\u5b9a\u575a\u5b9e\u7684\u57fa\u7840\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7\u9879\u76ee\u5b9e\u8df5\uff0c\u4f60\u5c06\u66f4\u597d\u5730\u7406\u89e3 JavaScript \u7684\u5e94\u7528\uff0c\u5e76\u63d0\u5347\u5b9e\u9645\u5f00\u53d1\u80fd\u529b\u3002\u672c\u7ae0\u8282\u5c06\u5e26\u4f60\u4e00\u6b65\u6b65\u5b8c\u6210\u591a\u4e2a\u9879\u76ee [&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-1412","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/1412","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=1412"}],"version-history":[{"count":2,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/1412\/revisions"}],"predecessor-version":[{"id":1423,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/1412\/revisions\/1423"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=1412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=1412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=1412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}