Form Pemesanan Makanan dan Minuman tugaspraktikum.js <br /> function hapus() {<br /> document.mnda.reset();<br /> }<br /> <br /> function total() {<br /> var a1 = eval (document.mnda.menu1.value)<br /> var a2 = eval (document.mnda.pesan1.value)<br /> var a3 = a1*a2 <br /> <br /> var b1=eval(document.mnda.menu2.value)<br /> var b2=eval(document.mnda.pesan2.value)<br /> var b3=b1*b2<br /> <br /> var c1=eval(document.mnda.menu3.value)<br /> var c2=eval(document.mnda.pesan3.value)<br /> var c3=c1*c2<br /> <br /> var d1=eval(document.mnda.menu4.value)<br /> var d2=eval(document.mnda.pesan4.value)<br /> var d3=d1*d2<br /> <br /> var e1=eval(document.mnda.menu5.value)<br /> var e2=eval(document.mnda.pesan5.value)<br /> var e3=e1*e2<br /> <br /> var f1=eval(document.mnda.menu6.value)<br /> var f2=eval(document.mnda.pesan6.value)<br /> var f3=f1*f2<br /> <br /> var g1=eval(document.mnda.menu7.value)<br /> var g2=eval(document.mnda.pesan7.value)<br /> var g3=g1*g2<br /> <br /> var h1=eval(document.mnda.menu8.value)<br /> var h2=eval(document.mnda.pesan8.value)<br /> var h3=h1*h2<br /> <br /> var i1=eval(document.mnda.menu9.value)<br /> var i2=eval(document.mnda.pesan9.value)<br /> var i3=i1*i2<br /> <br /> var j1=eval(document.mnda.menu10.value)<br /> var j2=eval(document.mnda.pesan10.value)<br /> var j3=j1*j2<br /> <br /> var jml=a3+b3+c3+d3+e3+f3+g3+h3+i3+j3<br /> <br /> document.mnda.total_bayar.value = jml<br /> }<br /> <br /> function nol1() {<br /> document.mnda.pesan1.value=""<br /> }<br /> function nol2() {<br /> document.mnda.pesan2.value=""<br /> }<br /> function nol3() {<br /> document.mnda.pesan3.value=""<br /> }<br /> function nol4() {<br /> document.mnda.pesan4.value=""<br /> }<br /> function nol5() {<br /> document.mnda.pesan5.value=""<br /> }<br /> function nol6() {<br /> document.mnda.pesan6.value=""<br /> }<br /> function nol7() {<br /> document.mnda.pesan7.value=""<br /> }<br /> function nol8() {<br /> document.mnda.pesan8.value=""<br /> }<br /> function nol9() {<br /> document.mnda.pesan9.value=""<br /> }<br /> function nol10() {<br /> document.mnda.pesan10.value=""<br /> }<br /> <br /> function diskon() {<br /> var con = 0<br /> var jmlh = eval (document.mnda.total_bayar.value)<br /> if (jmlh >= 50000)<br /> {<br /> con = 10000<br /> }<br /> document.mnda.pot_har.value = con<br /> }<br /> <br /> function bayar() {<br /> var hrg = eval (document.mnda.total_bayar.value)<br /> var diskon = eval (document.mnda.pot_har.value)<br /> var byr = hrg-diskon<br /> document.mnda.Jum_bayar.value = byr <br /> }<br /> tugaspraktikum.html <br /><!DOCTYPE html><br /><html lang="en"><br /><br /><head><br /><title>Tugas Praktikum</title><br /><script type="text/javascript" src="tuprak.js"></script><br /></head><br /><br /><body><br /><h2>Form Pemesanan Berbasis JavaScript</h2><br /> <form name="mnda" action="#"><br /> <table border="1px"><br /> <tr><br /> <th>No</th><br /> <th>Makanan/Minuman</th><br /> <th>Harga</th><br /> <th>Pesan</th><br /> </tr><br /> <tr><br /> <td>1.</td><br /> <td>Bakso</td><br /> <td>@ <input type="text" name="menu1" value="6000" disabled="true"></td><br /> <td><input type="text" name="pesan1" value="0" onchange="total(),diskon(),bayar()" onclick="nol1()"></td><br /> </tr><br /> <tr><br /> <td>2.</td><br /> <td>Mie Goreng</td><br /> <td>@ <input type="text" name="menu2" value="3500" disabled="true"></td><br /> <td><input type="text" name="pesan2" value="0" onchange="total(),diskon(),bayar()" onclick="nol2()"></td><br /> </tr><br /> <tr><br /> <td>3.</td><br /> <td>Mie Ayam</td><br /> <td>@ <input type="text" name="menu3" value="5000" disabled="true"></td><br /> <td><input type="text" name="pesan3" value="0" onchange="total(),diskon(),bayar()" onclick="nol3()"></td><br /> </tr><br /> <tr><br /> <td>4.</td><br /> <td>Nasi Goreng</td><br /> <td>@ <input type="text" name="menu4" value="6000" disabled="true"></td><br /> <td><input type="text" name="pesan4" value="0" onchange="total(),diskon(),bayar()" onclick="nol4()"></td><br /> </tr><br /> <tr><br /> <td>5.</td><br /> <td>Telur Asin</td><br /> <td>@ <input type="text" name="menu5" value="2000" disabled="true"></td><br /> <td><input type="text" name="pesan5" value="0" onchange="total(),diskon(),bayar()" onclick="nol5()"></td><br /> </tr><br /> <tr><br /> <td>6.</td><br /> <td>Air Putih</td><br /> <td>@ <input type="text" name="menu6" value="500" disabled="true"></td><br /> <td><input type="text" name="pesan6" value="0" onchange="total(),diskon(),bayar()" onclick="nol6()"></td><br /> </tr><br /> <tr><br /> <td>7.</td><br /> <td>Es Teh Anget</td><br /> <td>@ <input type="text" name="menu7" value="1500" disabled="true"></td><br /> <td><input type="text" name="pesan7" value="0" onchange="total(),diskon(),bayar()" onclick="nol7()"></td><br /> </tr><br /> <tr><br /> <td>8.</td><br /> <td>Es Jeruk Anget</td><br /> <td>@ <input type="text" name="menu8" value="2000" disabled="true"></td><br /> <td><input type="text" name="pesan8" value="0" onchange="total(),diskon(),bayar()" onclick="nol8()"></td><br /> </tr><br /> <tr><br /> <td>9.</td><br /> <td>Teh Panas</td><br /> <td>@ <input type="text" name="menu9" value="1500" disabled="true"></td><br /> <td><input type="text" name="pesan9" value="0" onchange="total(),diskon(),bayar()" onclick="nol9()"></td><br /> </tr><br /> <tr><br /> <td>10.</td><br /> <td>SoGem</td><br /> <td>@ <input type="text" name="menu10" value="5000" disabled="true"></td><br /> <td><input type="text" name="pesan10" value="0" onchange="total(),diskon(),bayar()" onclick="nol10()"></td><br /> </tr><br /> <tr><br /> <td colspan="3" align="right">Total Bayar</td><br /> <td><input type="text" name="total_bayar" disabled="true"></td><br /> </tr><br /> <tr><br /> <td colspan="3" align="right">Diskon</td><br /> <td><input type="text" name="pot_har" disabled="true"></td><br /> </tr><br /> <tr><br /> <td colspan="3" align="right">Jumlah Bayar</td><br /> <td><input type="text" name="Jum_bayar" disabled="true"></td><br /> </tr><br /> </table><br /> <br /> Gak jadi :<br /> <input type="button" value=" Bantal " onclick="hapus()"><br /> <br /> <p> ©<br /> <a href="http://www.facebook.com/septianawindamaulida">Septiana Winda Maulida</a><br /><br /> </form><br /></body><br /></html>
You can replace this text by going to "Layout" and then "Page Elements" section. Edit " About "
Tidak ada komentar:
Posting Komentar