Multiplication of two input values and the Result will be shown in total input using JQuery

Hello Friends today i am going to show you one magic using jquery

if you have two inputs says amount1 and amount2

and you want its multiplication shown in total input field.

Here is a small jquery,you just need to pass the id of input fields.

<script type=”text/javascript”>
var amount1=$(‘#amount1’).val();
var amount2=$(‘#amount2’).val();
var Total=amount1*amount2;
$(‘#total’).attr(‘value’, Total);

you will need to add its main jquery file,and this will work.

try this out magic…………………!!!!!!!!!!!!!!!!!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your 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