Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  15] [ 6]  / answers: 1 / hits: 32164  / 13 Years ago, fri, april 1, 2011, 12:00:00

How can you do something like this:



<a href=some javascript statement that isn't a function call; >myLink</a>


And have the js in the href execute when the link is clicked.


More From » html

 Answers
20
<a href=javascript:var hi = 3; >myLink</a>


Now you can use hi anywhere to get 3.


[#92955] Thursday, March 31, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
marisela

Total Points: 103
Total Questions: 105
Total Answers: 102

Location: Solomon Islands
Member since Fri, Oct 8, 2021
3 Years ago
;