{"id":221435,"date":"2020-12-01T13:10:18","date_gmt":"2020-12-01T05:10:18","guid":{"rendered":"http:\/\/4563.org\/?p=221435"},"modified":"2020-12-01T13:10:18","modified_gmt":"2020-12-01T05:10:18","slug":"%e8%af%b7%e6%95%99%ef%bc%8c-a-%e6%a0%87%e7%ad%be%e5%9c%a8%e6%9c%ac%e6%a0%87%e7%ad%be%e9%a1%b5%e9%9d%a2%e5%88%87%e6%8d%a2%e4%b9%8b%e5%89%8d%e5%81%9a%e5%9f%8b%e7%82%b9","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=221435","title":{"rendered":"\u8bf7\u6559\uff0c a \u6807\u7b7e\u5728\u672c\u6807\u7b7e\u9875\u9762\u5207\u6362\u4e4b\u524d\u505a\u57cb\u70b9"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bf7\u6559\uff0c a \u6807\u7b7e\u5728\u672c\u6807\u7b7e\u9875\u9762\u5207\u6362\u4e4b\u524d\u505a\u57cb\u70b9               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : BUappend <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5728 a \u6807\u7b7e\u5728\u672c\u9875\u9762\u8df3\u8f6c\u5230\u672c\u9875\u9762\u4e4b\u524d\u505a\u57cb\u70b9\u53d1\u9001\uff0c\u53d1\u73b0 ajax \u53d1\u9001\u4e0d\u51fa\u53bb\uff0c\u540e\u6765\u53d1\u73b0\u662f click \u4e8b\u4ef6\u5230\u8df3\u8f6c\u4e8b\u4ef6\u53d1\u751f\u7684\u65f6\u95f4\u95f4\u8ddd\u7279\u522b\u5c0f\uff0c\u96f6\u70b9\u51e0\u6beb\u79d2\uff0c\u6240\u4ee5 click \u4e4b\u540e\u53d1\u9001\u7684 ajax \u4e8b\u4ef6\u4f1a\u88ab\u62e6\u622a\u629b\u5f03\u6389\uff0c\u4f46\u662f\u6211\u5199\u4e86\u4e2a\u5c0f demo \u6d4b\u8bd5\u4e0b\uff0c\u7a81\u7136\u53d1\u73b0 demo \u91cc\u9762\u7684 ajax \u5c45\u7136\u80fd\u53d1\u9001\u51fa\u53bb\u3002\u6240\u4ee5\u6211\u5c31\u6709\u70b9\u8ff7\u4e86\uff0c\u5230\u5e95\u662f\u600e\u4e48\u56de\u4e8b\u5462\uff1f\uff1f\uff1f<\/p>\n<pre><code>&lt;a href=\"https:\/\/www.baidu.com\/\" id=\"hand\"&gt;\u70b9\u6211\u8df3\u8f6c&lt;\/a&gt;  let hand = document.getElementById('hand') hand.addEventListener('click', () =&gt; {     ajax(url) }) function ajax(url) {      let xhr = new XMLHttpRequest()      xhr.open(\"GET\", url, true)        return new Promise((res, rej) =&gt; {           xhr.onload = function () {               xhr.status &lt; 300 ? res() : rej()           }           xhr.send()        }) } <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4468760\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : seki <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u9875\u9762\u8df3\u8f6c\u548c\u53d1\u8bf7\u6c42\u662f\u4e24\u4e2a\u5e76\u884c\u7684\u4e8b\u60c5\uff0c\u8c01\u5148\u8c01\u540e\u90fd\u662f\u6709\u53ef\u80fd\u7684<\/p>\n<p>\u8fd9\u79cd\u60c5\u51b5\u5c31\u9700\u8981\u627e\u4e00\u4e2a\u4e0d\u88ab\u9875\u9762\u8df3\u8f6c\u9500\u6bc1\u7684\u5730\u65b9\u6682\u5b58\u4e00\u4e0b\u6570\u636e\uff0c\u6bd4\u5982\u5982\u679c\u8df3\u8f6c\u8fc7\u53bb\u7684\u662f\u81ea\u5bb6\u9875\u9762\u7684\u8bdd\uff0c\u7528 session storage \u4e4b\u7c7b\u7684                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4468761\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : BUappend <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @seki \u4e3a\u5565\u6211\u5199\u7684\u8fd9\u4e2a\u80fd\u53d1\u51fa\u53bb\u5462                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4468762\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Ptu2sha <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u770b\u770b\u4eba\u5bb6\u8bbf\u95ee\u7cfb\u7edf\u600e\u4e48\u5199\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4468763\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : des <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8981\u4e0d\u8981\u8bd5\u8bd5\u8fd9\u4e2a\uff1f<br \/>https:\/\/www.w3schools.com\/tags\/att_a_ping.asp                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4468764\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : BUappend <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @des \u611f\u8c22\uff0c\u4f46\u662f\u8fd9\u4e2a IE \u548c safari \u4e0d\u652f\u6301\u5440                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4468765\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ivank <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u4ee3\u7801\u91cc\u9762\u505a\u6210\u4e86 promise \u7248\u672c\u7684\u80af\u5b9a\u53ef\u4ee5\u554a \u8bf7\u6c42\u53d1\u9001\u6210\u529f\u540e\u624d\u8df3\u8f6c\u7684 \u8df3\u8f6c\u80af\u5b9a\u6709\u5ef6\u8fdf\u611f\uff0c\u4e0d\u8fc7\u4f60\u53ef\u4ee5\u4e86\u89e3\u4e0b sendBeacon                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u6559\uff0c a \u6807\u7b7e\u5728\u672c\u6807\u7b7e\u9875\u9762\u5207\u6362\u4e4b&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/221435"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=221435"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/221435\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221435"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}