JS如何模拟鼠标点击X,Y坐标-CSDN论坛-CSDN.NET-中国最大的IT技术社区

<!DOCTYPE html>

<html>

    <body>

    	<script>

    		function imitateClick(oElement, iClientX, iClientY) {

    			var oEvent;

				if (document.createEventObject) { //For IE

    				oEvent = document.createEventObject();

    				oEvent.clientX = iClientX;

    				oEvent.clientY = iClientY;

    				oElement.fireEvent("onclick", oEvent);	

    			} else {

    				oEvent = document.createEvent("MouseEvents");

    				oEvent.initMouseEvent("click", true, true, document.defaultView, 0, 0, 0, 

    							 	 	  iClientX, iClientY/*, false, false, false, false, 0, null*/); 

    				oElement.dispatchEvent(oEvent);

    			}

    		}

    		var body = document.body;

    		body.onclick = function(event) {

    			alert("clicked at (" + event.clientX + "," + event.clientY + ")");

    		};

    		imitateClick(body, 100, 100);

    	</script>

    </body>

</html>

http://bbs.csdn.net/topics/390142149