日期:2014-05-16 浏览次数:20373 次
<html> <head> <title></title> <script type="text/javascript"> function DoRightClick(event){ event = (event)?event:window.event; //event=event||event; alert(event.clientX); } </script> </head> <body onmousedown="window.setTimeout('DoRightClick(event);',400)"> </body> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <script type="text/javascript"> document.oncontextmenu = test; function DoRightClick(cx) { document.getElementById("odiv").innerHTML=cx; } function test(e) { var evn = window.event || e; var cx = evn.clientX; setTimeout(function () { DoRightClick(cx); }, 400); return false; } </script> <div id="odiv"></div> </body> </html>