Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <!--
- <htmlApplication
- fixedSize="no"
- width=500
- height=300
- contextmenu="no"
- hidden="no"
- menu="no" />
- -->
- <html>
- <head>
- <title>CASHIER APPLICATION UNIT</title>
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <style>
- .tengah{
- }
- table{
- background: coral;
- margin:auto;
- }
- </style>
- </head>
- <body class="tengah">
- <div>
- <table border="1">
- <h2 align="center" style="background: coral">CASHIER APPLICATION UNIT</h2>
- <tr>
- <th>NAMA BARANG</th>
- <th><input type="text" id="nama" onchange="total()" ></th>
- </tr>
- <tr>
- <th>HARGA</th>
- <th><input type="number" id="harga" onchange="total()"></th>
- </tr>
- <tr>
- <th>JUMLAH BELI</th>
- <th><input type="number" id="jumlah" value="0" onchange="total()"></th>
- </tr>
- <tr>
- <th>KATEGORI</th>
- <th><select id="status" onchange="total()">
- <option>BUAH SEGAR</option>
- <option>MAKANAN</option>
- <option>PAKAIAN</option>
- <option>MINUMAN</option>
- <option>IKAN SEGAR</option>
- <option>PERLENGKAPAN RUMAH</option>
- <option>BUMBU DAPUR</option>
- </select></th>
- </tr>
- <tr>
- <th>JUMLAH TOTAL</th>
- <th><input type="text" style="background: yellow" id="total" disabled></th>
- </tr>
- <tr>
- <th>PEMBAYARAN</th>
- <th><input type="number" id="bayar" onchange="total()"></th>
- </tr>
- <tr>
- <th>KEMBALIAN</th>
- <th><input type="text" style="background: yellow" id="total1" disabled></th>
- </tr>
- <tr>
- <th><input type="button" style="background: white" onclick="window.print()" value="CETAK"></th>
- </tr>
- <tr>
- <table width="300" height="201px" border="8">
- <th><label align="landscape" id="cetak" ></label></th>
- </table>
- </tr>
- </table>
- <marquee scrolldelay="100" direction="left" bgcolor="coral"> > TERIMA KASIH TELAH MENGGUNAKAN PROGRAM INI ---------- PROGRAMER SILO KUSUMA ---------- DESIGNER BY SILO KUSUMA----------LAYOUT BY KAPAL NGODING < </marquee>
- <script type="text/javascript">
- function total() {
- var nama = document.getElementById('nama').value;
- var harga = parseInt(document.getElementById('harga').value);
- var jumlah_beli = parseInt(document.getElementById('jumlah').value);
- var pembayaran = parseInt(document.getElementById('bayar').value);
- var jenis = document.getElementById("status").value;
- var jumlah_harga = harga * jumlah_beli;
- document.getElementById('total').value = jumlah_harga;
- var kembali = pembayaran - jumlah_harga;
- document.getElementById('total1').value = kembali;
- var cetak = "NAMA : "+nama+"</br>"+
- "HARGA : "+harga+"</br>"+
- "JUMLAH BELI : "+jumlah_beli+"</br>"+
- "KATEGORI : "+jenis+"</br>"+
- "JUMLAH TOTAL : "+jumlah_harga+"</br>"+
- "PEMBAYARAN : "+pembayaran+"</br>"+
- "KEMBALIAN : "+kembali;
- document.getElementById("cetak").innerHTML=cetak;
- }
- </script>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement