problem with multiplication variables from input
i have this code
i need to insert one value in the first input and auto calculate in the second and third input
- <input type="text" name="markup" id="markup">
- <input type="text" name="mark" id="mark">
- <input type="text" name="marknet" id="marknet">
- <script type="text/javascript" src="js/jquery.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
-
- var item1=$("#markup").val() / 100 ;
- var item2=$("#mark").val();
- var item3=item1 * item2;
- var item4=item3 + item2;
- $("#markup").change(function(){
- $("#mark").val(item3);
- $("$marknet").val(item4);
- });
- });
- </script>
-