<!DOCTYPE html>
<html>
<head>
  
</head><body><input type="button" value="点击" onClick="showState()"/>
<script>
function showState(){
 alert("altKey:"+window.event.altKey
  +"\nshiftKey:"+window.event.shiftKey
  +"\nctrlKey:"+window.event.ctrlKey);
}</script></body>
</html>