Open link in new tab/window
<a href="example.com" target="_blank">Text Here</a>
Link that runs JavaScript
<a href="javascript:myFunction();">Run Code</a>
You can also achieve the same thing using the onclick attribute:
<a href="#" onclick="myFunction(); return false;">Run Code</a>
Link that runs email client
Basic usage
If the value of the href-attribute begins with mailto: it will try to open an email client on click:
<a href="mailto:example@example.com">Send email</a>
This will put the email address example@example.com as the recipient for the newly created email.
Comments
Post a Comment