Jquery – Use of function – Passing values through function

Here we study about the jquery function. By using function we can use same code for multiple times. Here I have created the Add function which I can use for no. of times.
The code is as follows

<!DOCTYPE html>
<title>Passing Value Through Function</title>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<input type="text" id="textboxone">+
<input type="text" id="textboxtwo">=<span style="padding:0 10px;"></span>
<button id="addbutton">Add</button>

	var a=$("#textboxone").val();
	var b=$("#textboxtwo").val();
	var d=addnumbers(a,b);
function addnumbers(a,b)
	var c=Number(a)+Number(b);
	return c;

Searched Tags- for this post :
0nikhil, nikhil ughade, Jquery, addition of numbers using jquery, jquery function

Hope it will help you.

Nikhil Ughade
(WEB DeSigNer)

Nikhil on Deviant Art
Art – community of artists and those devoted to art. Digital art, skin art, themes, wallpaper art, traditional art, photography, poetry / prose. Art prints.

Nikhil on Twitter
—— Advertise Starts ——

—— Advertise Ends ——


About Nikhil
Name : Nikhil Ughade UI Developer, Accidentally in design field, no turn back since then. Location : Pune (MH, INDIA) From : Amravati (MH,INDIA) College : VYWS's College Of Engg. Badnera, Amravati Hobby : Social Networking, Designing Web Sites, Photography, Reading Books. In Free time works for NGO.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: