Skip to content
Advertisement

I want to do so if you press a linked line it insted of sending you to a website i makes an alert [closed]

My current code:

<a href="chrome://inducebrowsercrashforrealz" target="_blank">DONT PRESS ME!</a>
<br/>

Advertisement

Answer

This works for me, usually:

<a style="cursor: pointer" onclick="alert('Hello')">DONT PRESS ME!</a>
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement