{"id":3604,"date":"2024-11-10T10:26:25","date_gmt":"2024-11-10T02:26:25","guid":{"rendered":"https:\/\/fwq.ai\/blog\/3604\/"},"modified":"2024-11-10T10:26:25","modified_gmt":"2024-11-10T02:26:25","slug":"js%e6%96%87%e4%bb%b6%e5%8e%8b%e7%bc%a9%e5%90%8e%e6%96%b9%e6%b3%95%e8%b0%83%e7%94%a8%e5%87%ba%e7%8e%b0undefined%ef%bc%8c%e5%a6%82%e4%bd%95%e8%a7%a3%e5%86%b3%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/3604\/","title":{"rendered":"JS\u6587\u4ef6\u538b\u7f29\u540e\u65b9\u6cd5\u8c03\u7528\u51fa\u73b0undefined\uff0c\u5982\u4f55\u89e3\u51b3\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173106905129318.jpg\" class=\"aligncenter\" title=\"JS\u6587\u4ef6\u538b\u7f29\u540e\u65b9\u6cd5\u8c03\u7528\u51fa\u73b0undefined\uff0c\u5982\u4f55\u89e3\u51b3\uff1f\u63d2\u56fe\" alt=\"JS\u6587\u4ef6\u538b\u7f29\u540e\u65b9\u6cd5\u8c03\u7528\u51fa\u73b0undefined\uff0c\u5982\u4f55\u89e3\u51b3\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>js\u6587\u4ef6\u538b\u7f29\u5bfc\u81f4\u65b9\u6cd5\u8c03\u7528\u53d8\u4e3aundefined<\/strong><\/p>\n<p>\u538b\u7f29\u540e\u7684JS\u6587\u4ef6\u8c03\u7528\u65b9\u6cd5\u65f6\u51fa\u73b0undefined\uff0c\u8fd9\u662f\u56e0\u4e3a\u538b\u7f29\u5de5\u5177\u53ef\u80fd\u66f4\u6539\u4e86\u51fd\u6570\u6216\u53d8\u91cf\u7684\u540d\u79f0\u3002<\/p>\n<p><strong>\u793a\u4f8b\u4ee3\u7801<\/strong><\/p>\n<pre>function adduserlis(e, l) {\n  var i = $(e).length;\n  let n = $(e).eq(parseInt(Math.random() * i + 1 - 1));\n  n.before(l), $(e).eq(0).after(l), $(e).eq(i + 1).after(l);\n}\n\nfunction add_category(e) {\n  let d = $(e);\n  for (let n = 0; n &lt; d.length; n++) {\n    let e = d.eq(n).children(),\n      l = e.eq(Math.floor(Math.random() * e.length - 1 + 1)),\n      i = l.clone().addClass(\"d-none\");\n    i.find(\"a\").attr(\"href\", \"\/add\"), l.before(i);\n  }\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u538b\u7f29\u540e\u7684\u4ee3\u7801\uff1a<\/p>\n<pre>function a(e,l){var i=$(e).length;let n=$(e).eq(parseInt(Math.random()*i+1-1));n.before(l),$(e).eq(0).after(l),$(e).eq(i+1).after(l)}function b(e){let d=$(e);for(let n=0;n&lt;d.length;n++){let e=d.eq(n).children(),l=e.eq(Math.floor(Math.random()*e.length-1+1)),i=l.clone().addClass(\"d-none\");i.find(\"a\").attr(\"href\", \"\/add\"), l.before(i)}}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p><span>\u70b9\u51fb\u4e0b\u8f7d<\/span>\u201c\u201d\uff1b<\/p>\n<ol>\n<li>\n<p><strong>\u68c0\u67e5\u538b\u7f29\u540e\u7684\u4ee3\u7801\u662f\u5426\u5b8c\u6574<\/strong><\/p>\n<p>\u538b\u7f29\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u5220\u9664\u6ce8\u91ca\u6216\u65e0\u7528\u7684\u4ee3\u7801\u5757\uff0c\u5982\u679c\u5b9e\u9645\u8c03\u7528\u7684\u51fd\u6570\u6216\u53d8\u91cf\u5df2\u538b\u7f29\u79fb\u9664\uff0c\u5c31\u4f1a\u5bfc\u81f4undefined\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u6620\u5c04\u6587\u4ef6\u6062\u590d\u51fd\u6570\u540d<\/strong><\/p>\n<p>\u6709\u4e9b\u538b\u7f29\u5de5\u5177\u4f1a\u63d0\u4f9b\u6620\u5c04\u6587\u4ef6\uff0c\u8be5\u6587\u4ef6\u5305\u542b\u538b\u7f29\u540e\u4ee3\u7801\u548c\u539f\u59cb\u4ee3\u7801\u4e4b\u95f4\u7684\u5bf9\u5e94\u5173\u7cfb\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b83\u5c06\u538b\u7f29\u540e\u7684\u51fd\u6570\u540d\u6620\u5c04\u56de\u539f\u59cb\u51fd\u6570\u540d\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u4ee5\u4e0a\u5c31\u662fJS\u6587\u4ef6\u538b\u7f29\u540e\u65b9\u6cd5\u8c03\u7528\u51fa\u73b0undefined\uff0c\u5982\u4f55\u89e3\u51b3\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>js\u6587\u4ef6\u538b\u7f29\u5bfc\u81f4\u65b9\u6cd5\u8c03\u7528\u53d8\u4e3aundefined \u538b\u7f29\u540e\u7684JS\u6587\u4ef6\u8c03\u7528\u65b9\u6cd5\u65f6\u51fa\u73b0undefined\uff0c\u8fd9\u662f\u56e0\u4e3a\u538b\u7f29\u5de5\u5177\u53ef\u80fd\u66f4\u6539\u4e86\u51fd\u6570\u6216\u53d8\u91cf\u7684\u540d\u79f0\u3002 \u793a\u4f8b\u4ee3\u7801 function adduserlis(e, l) { var i = $(e).length; let n = $(e).eq(parseInt(Math.random() * i + 1 &#8211; 1)); n.before(l), $(e).eq(0).after(l), $(e).eq(i + 1).after(l); } function add_category(e) { let d = $(e); for (let n = 0; n &lt; d.length; n++) { let e = d.eq(n).children(), l = e.eq(Math.floor(Math.random() * e.length &#8211; 1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-3604","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=3604"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3604\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=3604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=3604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=3604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}