JavaScript中这个jQuery,如果用JavaScript写,怎么写?
The mouse pointer position is at:
window.addEventListener('mousemove', function(event) {
var spanNode = document.querySelector('span');
spanNode.innerText = 'X: ' + event.pageX + ', Y: ' + event.pageY;
})
赞0
踩0