Skip to content

tgs modul5

March 9, 2011

<!–DOCTYPE html>

<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<span class=”hiddenSpellError” pre=””>tgs</span> modul 5
<style type=”text/css”>
<!–
.style3 {font-family: Verdana, Arial, Helvetica, sans-serif}
–>
</style>
</head>

<body>
<html>
<title></title>

<script language=”JavaScript” type=”text/javascript”>
function pemesanan(){
var nota = document.form2;
var hargaBakso = 15000 * eval(nota.hrgBakso.value);
var hargaSoto = 13000 * eval(nota.hrgSoto.value);
var hargaMie = 18000 * eval(nota.hrgMie.value);
var hargaTeler = 10000 * eval(nota.hrgTeler.value);
var hargaCampur = 10000 * eval(nota.hrgCampur.value);
var TotalHarga = hargaBakso + hargaSoto + hargaMie + hargaTeler + hargaCampur;
if (TotalHarga > 50000){
nota.Total.value = TotalHarga;
nota.Diskon.value = 10000;
nota.Bayar.value = TotalHarga – eval(nota.Diskon.value);
} else {
nota.Total.value = TotalHarga;
nota.Diskon.value = 0;
nota.Bayar.value = TotalHarga – eval(nota.Diskon.value);
}
}
function resetForm(){
document.form2.reset();
}
</script>

<blockquote>
<H2 align=”left”>Daftar Harga Makan dan Minum
</blockquote>
<form name=”form2″ action=”#”>
<table border=”7″ bgcolor=”#0066FF”>
<tr>
<th bgcolor=”#0066FF”><span>No</span></th>
Makanan & Minuman
Harga @
<th bgcolor=”#0066FF”><span>Pesanan</span></th>
</tr>
<tr>
<td width=”24″ bgcolor=”#0066FF”><span>1</span></td>
Bakso Tenis
<td width=”128″ bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”bakso” value=”15000″ size=”9″

readonly=”readonly”/>
</div></td>
<td width=”204″ bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”hrgBakso” value=”0″ onFocus=”this.select()”

onChange=”pemesanan()”/>
</div></td>
</tr>
<tr>
<td bgcolor=”#0066FF”><span>2</span></td>
Soto Daging
<td bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”soto” value=”13000″ size=”9″

readonly=”readonly”/>
</div></td>
<td bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”hrgSoto” value=”0″ onFocus=”this.select()”

onChange=”pemesanan()”/>
</div></td>
</tr>
<tr>
<td bgcolor=”#0066FF”><span>3</span></td>
Mie Ayam Kampus
<td bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”mie” value=”18000″ size=”9″

readonly=”readonly”/>
</div></td>
<td bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”hrgMie” value=”0″ onFocus=”this.select()”

onChange=”pemesanan()”/>
</div></td>
</tr>
<tr>
<td bgcolor=”#0066FF”><span>4</span></td>
Es Teler
<td bgcolor=”#0066FF”><div align=”center”>
<input name=”teler” type=”text” id=”teler” value=”10000″ size=”9″

readonly=”readonly”/>
</div></td>
<td bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”hrgTeler” value=”0″ onFocus=”this.select()”

onChange=”pemesanan()”/>
</div></td>
</tr>
<tr>
<td bgcolor=”#0066FF”><span>5</span></td>
<td bgcolor=”#0066FF”><span>Es Campur</span></td>
<td bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”campur” value=”10000″ size=”9″

readonly=”readonly”/>
</div></td>
<td bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”hrgCampur” value=”0″ onFocus=”this.select()”

onChange=”pemesanan()”/>
</div></td>
</tr>
<tr bgcolor=”#ff00ff”>
<td colspan=”3″ align=”right” bgcolor=”#0066FF”><span> Total</span></td>
<td bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”Total” readonly=”readonly” />
</div></td>
</tr>
<tr bgcolor=”#ff00ff”>
<td colspan=”3″ align=”right” bgcolor=”#0066FF”><span>Diskon</span></td>
<td bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”Diskon” readonly=”readonly”/>
</div></td>
</tr>
<tr bgcolor=”#ff00ff”>
Jumlah Dibayar
<td bgcolor=”#0066FF”><div align=”center”>
<input type=”text” name=”Bayar” readonly=”readonly” align=”right”/>
</div></td>
</tr>
</table>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<p><br/>
<input name=”button” type=”button” onClick=”resetForm()” value=”Hapus” />
</p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</form>
</body>
</html></em>
</body>
</html>

No comments yet

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: