Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <meta name="language" content="en" />
- <meta http-equiv="content-language" content="en" />
- <title>Test</title>
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
- </head>
- <body>
- <script>
- function calcul() {
- var total = parseInt($('#studenttut option:selected').val()) +
- parseInt($('#campusrb>option:selected').val()) *
- parseInt($('#yearsatten>option:selected').val());
- $("#total").text(total);
- }
- </script>
- <select id="studenttut">
- <option value="5">5</option>
- <option value="10">10</option>
- </select>
- <select id="campusrb">
- <option value="0">0</option>
- <option value="1">1</option>
- </select>
- <select id="yearsatten">
- <option value="1">1</option>
- <option value="2">2</option>
- </select>
- <input type="button" onClick="calcul()" value="calcul"/>
- <div id="total">total</div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement