HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p onmousedown="myFunction(event)">Hold 'ALT' key and click on me</p> <script> function myFunction(e){ if(e.altKey) alert("altKey was Pressed"); else alert("altKey was not Pressed"); } </script> </body> </html>
OUTPUT
×

Save as Private