Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
192
rated 0 times [  195] [ 3]  / answers: 1 / hits: 58874  / 11 Years ago, tue, march 12, 2013, 12:00:00

I have a website with some links. when a user clicks on each link it should pass different integer values which I can use in a .js file.
I have to make some operations on the basis of these integer values.
please help!!!


More From » jquery

 Answers
1

Though this question is most likely to get closed. You can call a function and pass the integer as parameter.



try this



 <a href=#  onclick=yourFunction('1')>click1</a>
<a href=# onclick=yourFunction('2')>click2</a>


javascript



 function yourFunction(intValue){
alert(intValue);
}

[#79652] Monday, March 11, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
loganl

Total Points: 424
Total Questions: 86
Total Answers: 112

Location: Zimbabwe
Member since Thu, Jul 21, 2022
2 Years ago
;