$(this).mousemove(function(e) {}}) 為什么要加e才有反應, 去掉沒反應了。我記得可以不加的吧?
? ? <h4>測試二</h4>
? ? <div class="left">
? ? ? ? <div class="aaron1">
? ? ? ? ? ? <p>鼠標在綠色區域移動觸發mousemove</p>
? ? ? ? ? ? <p>移動的X位置:</p>
? ? ? ? </div>
? ? </div>
? ? <script type="text/javascript">
? ? //綁定一個mousemove事件
? ? //觸發后修改內容
? ? $(this).mousemove(function(e) {
? ? ? ? $(".aaron1").find('p:last').html('移動的X位置:' + e.pageX)
? ? })
? ? </script>
2017-06-29
event對象 ?JS課程有講過 ?獲取鼠標坐標值需要event.pageX ? JS語法 event.clientX
2019-12-11
this? 是什么 有大佬指點下嗎
2017-07-18
加與不加 要看程序后面,我們是否需要它,它到底起沒起作用。
就像函數 有無參函數和有參函數。