Simulate click at x/y coordinates using javascript
问题 How can I simulate a click at x/y co-ordinates using javascript or jquery? I will use the script multiple times and I want the script to click on postion one then postion two then three then four and so one. It is better without moving the mouse cursor, but if it has to move then that is fine as well. 回答1: This can actually be accomplished with the document.elementFromPoint method. A jQuery example: function simulateClick(x, y) { jQuery(document.elementFromPoint(x, y)).click(); }