Everyone. I don't know much about programming and languages, I only have a few basics on HTML
, so I hope someone could help me understanding the difference between the following two lines:
<a onclick="window.location.href='http://www.example.com'">Click here</a>
<a href="http://www.example.com">Click here</a>
Both seem to do the exact same thing, but I'm not sure if this is not true in all cases, i.e. using different browsers, HTML
/HTML5
, etc.
Any help would be appreciated. Thanks.