by
97 7

OnClick without setting an attribute of the link

Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/2493356/OnClick-without-setting-an-attribute-of-?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
//<div id="dog" >Woow woow</div> (function() { document.getElementById("dog").onclick = function() { alert('fuf fuf'); }; })();
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus