{"id":25733,"date":"2024-11-24T14:32:37","date_gmt":"2024-11-24T06:32:37","guid":{"rendered":"https:\/\/fwq.ai\/blog\/25733\/"},"modified":"2024-11-24T14:32:37","modified_gmt":"2024-11-24T06:32:37","slug":"%e5%a6%82%e4%bd%95%e8%a7%a3%e5%86%b3-document-execcommand-%e8%bf%87%e6%97%b6%e5%b8%a6%e6%9d%a5%e7%9a%84%e7%ae%80%e8%b0%b1%e7%bc%96%e8%be%91%e5%99%a8%e5%bc%80%e5%8f%91%e9%9a%be%e9%a2%98%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/25733\/","title":{"rendered":"\u5982\u4f55\u89e3\u51b3 document.execCommand \u8fc7\u65f6\u5e26\u6765\u7684\u7b80\u8c31\u7f16\u8f91\u5668\u5f00\u53d1\u96be\u9898\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173069194548205.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u89e3\u51b3 document.execCommand \u8fc7\u65f6\u5e26\u6765\u7684\u7b80\u8c31\u7f16\u8f91\u5668\u5f00\u53d1\u96be\u9898\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u89e3\u51b3 document.execCommand \u8fc7\u65f6\u5e26\u6765\u7684\u7b80\u8c31\u7f16\u8f91\u5668\u5f00\u53d1\u96be\u9898\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>document.execcommand \u8fc7\u65f6\u4e86\uff0c\u9002\u914d\u65b0\u65f6\u4ee3<\/strong><\/p>\n<p><strong>\u95ee\u9898\uff1a<\/strong><\/p>\n<p>\u5728\u5f00\u53d1\u7b80\u8c31\u7f16\u8f91\u5668\u65f6\uff0c\u5f00\u53d1\u8005\u9047\u5230\u4e86\u4e00\u4e9b\u4f7f\u7528 document.execCommand \u9047\u5230\u7684\u56f0\u96be\uff0c\u5305\u62ec\u8bbe\u7f6e\u9ed8\u8ba4\u5185\u5bb9\u6837\u5f0f\u3001\u8c03\u6574\u5149\u6807\u4f4d\u7f6e\u4ee5\u53ca\u5bfb\u627e\u8fc7\u65f6 API \u7684\u66ff\u4ee3\u65b9\u6848\u3002<\/p>\n<p><strong>\u96be\u9898\u63a2\u7d22\uff1a<\/strong><\/p>\n<ul>\n<li> <strong>\u9ed8\u8ba4\u5185\u5bb9\u6837\u5f0f\u8c03\u6574\uff1a<\/strong><br \/>\u9ed8\u8ba4\u5185\u5bb9\u7684\u6837\u5f0f\u65e0\u6cd5\u901a\u8fc7 document.execCommand \u76f4\u63a5\u8bbe\u5b9a\uff0c\u56e0\u4e3a\u5176\u4f5c\u7528\u8303\u56f4\u4ec5\u9650\u4e8e\u540e\u7eed\u8f93\u5165\u6587\u672c\u3002<\/li>\n<li> <strong>\u5149\u6807\u5927\u5c0f\u5f02\u5e38\uff1a<\/strong><br \/>\u5b57\u4f53\u4fee\u6539\u540e\uff0c\u5149\u6807\u5927\u5c0f\u65e0\u6cd5\u5b9e\u65f6\u8c03\u6574\uff0c\u9700\u8981\u8f93\u5165\u65b0\u5185\u5bb9\u540e\u624d\u4f1a\u53d1\u751f\u6539\u53d8\u3002<\/li>\n<li> <strong>\u8fc7\u65f6 API \u66ff\u4ee3\uff1a<\/strong><br \/>document.execCommand \u5df2\u88ab\u6807\u8bc6\u4e3a\u8fc7\u65f6 API\uff0c\u9700\u8981\u5bfb\u627e\u66ff\u4ee3\u65b9\u6848\u6216\u66f4\u597d\u7684\u5b9e\u73b0\u65b9\u5f0f\u3002<\/li>\n<\/ul>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<ul>\n<li> <strong>\u66ff\u4ee3\u65b9\u6848\uff1a<\/strong><br \/>\u5f53\u524d\u8fd8\u6ca1\u6709\u660e\u786e\u7684\u66ff\u4ee3\u9009\u9879\uff0c\u4f46 document.execCommand \u5728\u77ed\u671f\u5185\u4ecd\u4f1a\u4fdd\u6301\u53ef\u7528\u6027\uff0c\u4ee5\u517c\u5bb9\u5386\u53f2\u9057\u7559\u9879\u76ee\u3002<\/li>\n<li> <strong>\u66f4\u597d\u7684\u5b9e\u73b0\uff1a<\/strong><br \/>\u63a8\u8350\u57fa\u4e8e\u6210\u719f\u7684\u5f00\u6e90\u5bcc\u6587\u672c\u7f16\u8f91\u5668\u8fdb\u884c\u6269\u5c55\uff0c\u4ee5\u6ee1\u8db3\u5b9a\u5236\u9700\u6c42\u3002\u8fd9\u79cd\u65b9\u5f0f\u5b9e\u73b0\u96be\u5ea6\u76f8\u5bf9\u8f83\u4f4e\u3002<\/li>\n<\/ul>\n<p><strong>\u7ed3\u8bba\uff1a<\/strong><\/p>\n<p>document.execCommand \u7684\u8fc7\u65f6\u5e76\u4e0d\u610f\u5473\u7740\u5bcc\u6587\u672c\u7f16\u8f91\u5668\u65e0\u6cd5\u5b9e\u73b0\u3002\u901a\u8fc7\u63a2\u7d22\u66ff\u4ee3\u65b9\u6848\u6216\u57fa\u4e8e\u5df2\u6709\u8d44\u6e90\u8fdb\u884c\u6269\u5c55\uff0c\u5f00\u53d1\u8005\u4ecd\u53ef\u4ee5\u6784\u5efa\u51fa\u529f\u80fd\u5f3a\u5927\u7684\u7b80\u8c31\u7f16\u8f91\u5668\uff0c\u6ee1\u8db3\u4e2a\u6027\u5316\u5b9a\u5236\u9700\u6c42\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u89e3\u51b3 document.execCommand \u8fc7\u65f6\u5e26\u6765\u7684\u7b80\u8c31\u7f16\u8f91\u5668\u5f00\u53d1\u96be\u9898\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>document.execcommand \u8fc7\u65f6\u4e86\uff0c\u9002\u914d\u65b0\u65f6\u4ee3 \u95ee\u9898\uff1a \u5728\u5f00\u53d1\u7b80\u8c31\u7f16\u8f91\u5668\u65f6\uff0c\u5f00\u53d1\u8005\u9047\u5230\u4e86\u4e00\u4e9b\u4f7f\u7528 document.execCommand \u9047\u5230\u7684\u56f0\u96be\uff0c\u5305\u62ec\u8bbe\u7f6e\u9ed8\u8ba4\u5185\u5bb9\u6837\u5f0f\u3001\u8c03\u6574\u5149\u6807\u4f4d\u7f6e\u4ee5\u53ca\u5bfb\u627e\u8fc7\u65f6 API \u7684\u66ff\u4ee3\u65b9\u6848\u3002 \u96be\u9898\u63a2\u7d22\uff1a \u9ed8\u8ba4\u5185\u5bb9\u6837\u5f0f\u8c03\u6574\uff1a\u9ed8\u8ba4\u5185\u5bb9\u7684\u6837\u5f0f\u65e0\u6cd5\u901a\u8fc7 document.execCommand \u76f4\u63a5\u8bbe\u5b9a\uff0c\u56e0\u4e3a\u5176\u4f5c\u7528\u8303\u56f4\u4ec5\u9650\u4e8e\u540e\u7eed\u8f93\u5165\u6587\u672c\u3002 \u5149\u6807\u5927\u5c0f\u5f02\u5e38\uff1a\u5b57\u4f53\u4fee\u6539\u540e\uff0c\u5149\u6807\u5927\u5c0f\u65e0\u6cd5\u5b9e\u65f6\u8c03\u6574\uff0c\u9700\u8981\u8f93\u5165\u65b0\u5185\u5bb9\u540e\u624d\u4f1a\u53d1\u751f\u6539\u53d8\u3002 \u8fc7\u65f6 API \u66ff\u4ee3\uff1adocument.execCommand \u5df2\u88ab\u6807\u8bc6\u4e3a\u8fc7\u65f6 API\uff0c\u9700\u8981\u5bfb\u627e\u66ff\u4ee3\u65b9\u6848\u6216\u66f4\u597d\u7684\u5b9e\u73b0\u65b9\u5f0f\u3002 \u89e3\u51b3\u65b9\u6848\uff1a \u66ff\u4ee3\u65b9\u6848\uff1a\u5f53\u524d\u8fd8\u6ca1\u6709\u660e\u786e\u7684\u66ff\u4ee3\u9009\u9879\uff0c\u4f46 document.execCommand \u5728\u77ed\u671f\u5185\u4ecd\u4f1a\u4fdd\u6301\u53ef\u7528\u6027\uff0c\u4ee5\u517c\u5bb9\u5386\u53f2\u9057\u7559\u9879\u76ee\u3002 \u66f4\u597d\u7684\u5b9e\u73b0\uff1a\u63a8\u8350\u57fa\u4e8e\u6210\u719f\u7684\u5f00\u6e90\u5bcc\u6587\u672c\u7f16\u8f91\u5668\u8fdb\u884c\u6269\u5c55\uff0c\u4ee5\u6ee1\u8db3\u5b9a\u5236\u9700\u6c42\u3002\u8fd9\u79cd\u65b9\u5f0f\u5b9e\u73b0\u96be\u5ea6\u76f8\u5bf9\u8f83\u4f4e\u3002 \u7ed3\u8bba\uff1a document.execCommand \u7684\u8fc7\u65f6\u5e76\u4e0d\u610f\u5473\u7740\u5bcc\u6587\u672c\u7f16\u8f91\u5668\u65e0\u6cd5\u5b9e\u73b0\u3002\u901a\u8fc7\u63a2\u7d22\u66ff\u4ee3\u65b9\u6848\u6216\u57fa\u4e8e\u5df2\u6709\u8d44\u6e90\u8fdb\u884c\u6269\u5c55\uff0c\u5f00\u53d1\u8005\u4ecd\u53ef\u4ee5\u6784\u5efa\u51fa\u529f\u80fd\u5f3a\u5927\u7684\u7b80\u8c31\u7f16\u8f91\u5668\uff0c\u6ee1\u8db3\u4e2a\u6027\u5316\u5b9a\u5236\u9700\u6c42\u3002 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u89e3\u51b3 document.execCommand \u8fc7\u65f6\u5e26\u6765\u7684\u7b80\u8c31\u7f16\u8f91\u5668\u5f00\u53d1\u96be\u9898\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},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-25733","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25733","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=25733"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25733\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=25733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=25733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=25733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}