{"id":297647,"date":"2021-01-18T06:51:31","date_gmt":"2021-01-17T22:51:31","guid":{"rendered":"http:\/\/4563.org\/?p=297647"},"modified":"2021-01-18T06:51:31","modified_gmt":"2021-01-17T22:51:31","slug":"%e6%a0%b9%e6%8d%ae%e6%89%b9%e9%87%8f%e5%af%b9%e8%b1%a1%e5%85%83%e7%b4%a0%e9%9b%86%e5%90%88%ef%bc%8c%e5%8e%bb%e5%ba%94%e7%94%a8%e8%84%9a%e6%9c%ac%e7%9a%84-onmousemove-%e5%8a%a8","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=297647","title":{"rendered":"\u6839\u636e\u201c\u6279\u91cf\u5bf9\u8c61\u5143\u7d20\u96c6\u5408\u201d\uff0c\u53bb\u5e94\u7528\u811a\u672c\u7684 onmousemove \u52a8\u4f5c\uff0c\u5982\u4f55\u5b9e\u73b0\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6839\u636e\u201c\u6279\u91cf\u5bf9\u8c61\u5143\u7d20\u96c6\u5408\u201d\uff0c\u53bb\u5e94\u7528\u811a\u672c\u7684 onmousemove \u52a8\u4f5c\uff0c\u5982\u4f55\u5b9e\u73b0\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : uti6770werty <\/span>  <span><i><\/i> 9<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<pre><code>    adiv=document.getElementById('adiv');     bdiv=document.getElementById('bdiv');     cdiv=document.getElementById('cdiv');     \/\/ .....     \/\/ ...     \/\/ .     \/\/ \u7565     zdiv=document.getElementById('zdiv');      \/\/\u53ea\u5bf9\u4e00\u4e2a\u5143\u7d20\u8fdb\u884c\u5e94\u7528     bdiv.onmousemove = function (activeelement) {         \/\/xxxx     } <\/code><\/pre>\n<p>\u662f\u4e0d\u662f\u53ea\u80fd\u5bf9\u6bcf\u4e2a div \u5143\u7d20\u91cd\u590d\u5730\u5199 onmousemove \u51fd\u6570\uff1f<br \/> \u6709\u4f18\u96c5\u7684\u6279\u91cf\u5199\u6cd5\u5417\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>4<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4980783\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Rhilip <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u4e3a\u5565\u4e0d\u4e0a\u4e2a\u5faa\u73af\uff1f\u6216\u8005\u5982\u679c id \u547d\u540d\u6709\u89c4\u5f8b\uff0c\u76f4\u63a5\u4f7f\u7528 querySelectorAll \u6765\u9009\u62e9<br \/>doucument.querySelectorAll(&#8220;xxxxx&#8221;).map(x =&gt; x.onmousemove = () =&gt; {})                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4980784\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : musi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e8b\u4ef6\u59d4\u6258\u4e86\u89e3\u4e00\u4e0b\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4980785\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shenyuzhi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5728 body \u4e0a\u76d1\u542c\uff0c\u7136\u540e\u5728 target \u4e0a dispatch                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4980786\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dd112389 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             window.addEventListener(&#8216;mousemove&#8217;, function (e) {<br \/> \/\/ adiv or bdiv or cdiv&#8230;&#8230;<br \/> let target = e.target;<br \/>});                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6839\u636e\u201c\u6279\u91cf\u5bf9\u8c61\u5143\u7d20\u96c6\u5408\u201d\uff0c\u53bb\u5e94\u7528\u811a&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\/297647"}],"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=297647"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/297647\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297647"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}