function abc(a,b,c)
{
alert('a :'+a+' b:'+ b);
xyz(c);
}
function xyz(c)
{
alert('c :' + c);
}
<a href="javascript:abc(1,2,3)" >click here to check value of abc </a>
-
8This is standard javascript and will work with jQuery, what do you need jQuery to do?beggs– beggs2009-11-09 07:56:54 +00:00Commented Nov 9, 2009 at 7:56
-
@beggs: Don't you mean without jQuery?Jan Aagaard– Jan Aagaard2009-11-09 08:06:23 +00:00Commented Nov 9, 2009 at 8:06
Add a comment
|
3 Answers
This is a wild guess but I think you might want to rename link to something like
<a id='myId'>click here ...</a>
And do the following in jquery
$(document).ready(function(){$('#myId').click(function(){
abc(1,2,3)})});
Jquery is a javascript framework, not a programming language.
1 Comment
sai
great thanx where can i get jquery basic fundas
jQuery is a JavaScript library whose purpose is to make some browser scripting tasks easier. It is not a replacement for JavaScript. Don't try to use it for everything.
Also, using onclick is preferable to using the javascript: pseudo-protocol in a link, and you should provide a real URL for the link to take the user when they have JavaScript turned off:
<a href="non_js_alternative.html" onclick="abc(1, 2, 3);">click here to check value of abc </a>