所属分类:web前端开发
<!DOCTYPE html> <html> <body onmousedown = "funcShiftKey(event)"> <div>Press and hold SHIFT key and then click here.</div> <script> function funcShiftKey(event) { if (event.shiftKey) { alert("SHIFT key: Pressed"); } else { alert("SHIFT key: NOT Pressed"); } } </script> </body> </html>