Jquery Function Example With Parameters - Jquery

How to pass parameters in jquery function?

Snippet Code


  
Rate this page :
  [ 0 votes]

Here, jquery function demofunction(5,5) ,which passes two parameters x and y. This function code simply returns the value by multiplying the parameters. The code using jquery function example is given below.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script> $(document).ready(function(){ function demofunction(x,y) { return (x * y); } alert(demofunction(5,5)); }); </script>

Tags


Ask Questions

Ask Question