Javascript related question
-
Hello All, I need to be able to set an href property of an anchor tag to a javascript i.e. <code> <a id="blah" href='this is where i've been told to have Javascript'"</code> This javascript is suppose to mimick a mouse click event. Can someone show me an example of how to go about doing that. I have barely used Javascript and not too familiar with it. Any help would be higly appreciated. Thanks ~tina
-
Hello All, I need to be able to set an href property of an anchor tag to a javascript i.e. <code> <a id="blah" href='this is where i've been told to have Javascript'"</code> This javascript is suppose to mimick a mouse click event. Can someone show me an example of how to go about doing that. I have barely used Javascript and not too familiar with it. Any help would be higly appreciated. Thanks ~tina
You could use something along the lines of:
<a href="javascript:ClickMe();">Click Me</a>
funtion ClickMe() {
alert('I got clicked!');
}