2012年10月20日土曜日

A タグにJavaScript適用

Any JavaScript code can be inserted inside to carry out an action when a link is clicked, thus the name, JavaScript url! For example, the below will pop up an alert box when the link is clicked:

Click here

<a href="javascript:alert('hi there!')">Click here</a>

0 件のコメント: