You are on page 1of 2

<html> <head> <title>Tugas Web 1</title> <script language="javascript"> function Next(){ var npm = document.input.i_npm.value; document.output.o_npm.

value =npm ; var matakuliah = document.input.i_matakuliah.value; document.output.o_matakuliah.value =matakuliah ; var jumlahsks = document.input.i_jumlahsks.value; document.output.o_jumlahsks.value =jumlahsks ; var biaya = document.input.i_jumlahsks.value; document.output.o_biaya.value =biaya*25000 ; var totalsks = document.hasil.total_sks.value = jumlahsks; var totalbiaya = document.hasil.total_biaya.value = jumlahsks*25000; } </script> </head> <body> <b> <h1>Chairunisa Syahriandini / 201143501216</h1> <h1>Input Data</h1> <form name="input"> <table border="0" bgcolor=orange> <tr> <td>NPM</td><td>:</td> <td><input type="text"name="i_npm" size="30"/></td> </tr> <tr> <td>Mata Kuliah</td><td>:</td> <td><input type="text"name="i_matakuliah" size="30"/></td> </tr> <tr> <td>Jumlah SKS</td><td>:</td> <td><input type="text"name="i_jumlahsks" size="10"/></td> </tr> <tr> <td align="center" colspan="3"></td> <td><input name="tombol1" onclick="Next()" type="button" value="Next" /> <input name="tombol2" type="reset" value="Cancel" /></td> </tr> </table> </form> <b> <h1>Output Data</h1> <form name="output"> <table border="0"> <table width="500" border="1" cellpandding="1" cellspacing="1"> <tr bgcolor="orange"> <th>NPM</th> <th>MATA KULIAH</th>

<th>JUMLAH SKS</th> <th>BIAYA</th> </tr> <tr> <th><input name="o_npm" type="text" /></th> <th><input name="o_matakuliah" type="text" /></th> <th><input name="o_jumlahsks" type="text" /></th> <th><input name="o_biaya" type="text" /></th> </tr> </table> </form> <form name="hasil"> <br /> <table width="250" border="1" cellpandding="1" cellspacing="1"> <tr bgcolor="orange"> <th>Total SKS</th> <th><input name="total_sks" type="text"/></th> <tr bgcolor="orange"> <th>Total Biaya</th> <th><input name="total_biaya" type="text"/></th> </tr> </table> </form> </body> </html>

You might also like