Jump to content

[SOLVED] Onclick event


ari_aaron

Recommended Posts

<script language="javascript">
function innerClick()
{
var clicker = document.getElementById('link1').attributes.onclick.value
document.getElementById('display').innerHTML = clicker;
}
</script>

<a id="link1" href="#" onClick="alert('hi!')" title="hi" onmouseup="innerClick()">test</a><br><br>

<span id="display"></span>

Link to comment
https://forums.phpfreaks.com/topic/80830-solved-onclick-event/#findComment-410088
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.