FULL CARA UNTUK MENGOPRASIKANNYA ADA DI LINK DI BAWAH
https://youtu.be/a8_uhfWeKw0
copy semua codingannya lalu simpan dengan ekstensi html (namabebas.html)
<form name=form>
<html>
<title>∑asy CORPORATION</title>
<font size=15><center>DATA GAJI KARYAWAN PT ∑asy</center></font>
<hr size=3 color=black>
<br>
<table size =10>
<tr><td>Nama Pegawai<td> : <input name=n>
<tr><td>Nip<td> : <input name=nip>
<tr><td>Jabatan<td> : <select name=jb>
<option>
<option>Direktur
<option>Manager
<option>Sekretaris
<tr><td>Tunjangan<td> : <select name=t>
<option>
<option>Anak
<option>Istri
<option>Anak&Istri
</select>
<br>
</table>
<input type=button value="InputGaji" onclick="proses()">
<input type=reset value="Batal">
<hr size=3 color=black>
<font size=15><CENTER>SLIP GAJI KARYAWAN PT ∑asy</CENTER></font>
<br>
<table>
<tr><td>Nip<td> : <input name=nip1>
<tr><td>Nama Karyawan<td> : <input name=n1>
<tr><td>Jabatan<td> : <input name=jb1>
<tr><td>Gaji<td> : <input name=gaji>
<tr><td>Tunjangan<td> : <input name=t1>
<tr><td>Total Tunjangan<td> : <input name=tj>
<tr><td>Pajak<td> : <input name=pajak>
<tr><td>Total Gaji<td> : <input name=tg>
</table>
<hr size=3 color=black>
</html>
<script>
function proses ()
{
var n1=(document.form.n.value);
document.form.n1.value=n1;
var nip1=(document.form.nip.value);
document.form.nip1.value=nip1;
var jb1=(document.form.jb.value);
document.form.jb1.value=jb1;
var jb=document.form.jb.value;
if(jb=="Direktur") var gaji=12000000;
if(jb=="Manager") var gaji=10000000;
if(jb=="Sekretaris") var gaji=9000000;
document.form.gaji.value=gaji;
var t1=(document.form.t.value);
document.form.t1.value=t1;
var t1=(document.form.t1.value);
var t=document.form.t.value;
if(t=="Anak") var p=0.2;
if(t=="Istri") var p=0.2;
if(t=="Anak&Istri") var p=0.3;
var tj=gaji*p;
document.form.tj.value=tj;
var pajak=0.025*gaji;
document.form.pajak.value=pajak;
var tg=gaji+tj-pajak;
document.form.tg.value=tg;
}
</script>
simpan dengan akhiran .html
https://youtu.be/a8_uhfWeKw0
copy semua codingannya lalu simpan dengan ekstensi html (namabebas.html)
<form name=form>
<html>
<title>∑asy CORPORATION</title>
<font size=15><center>DATA GAJI KARYAWAN PT ∑asy</center></font>
<hr size=3 color=black>
<br>
<table size =10>
<tr><td>Nama Pegawai<td> : <input name=n>
<tr><td>Nip<td> : <input name=nip>
<tr><td>Jabatan<td> : <select name=jb>
<option>
<option>Direktur
<option>Manager
<option>Sekretaris
<tr><td>Tunjangan<td> : <select name=t>
<option>
<option>Anak
<option>Istri
<option>Anak&Istri
</select>
<br>
</table>
<input type=button value="InputGaji" onclick="proses()">
<input type=reset value="Batal">
<hr size=3 color=black>
<font size=15><CENTER>SLIP GAJI KARYAWAN PT ∑asy</CENTER></font>
<br>
<table>
<tr><td>Nip<td> : <input name=nip1>
<tr><td>Nama Karyawan<td> : <input name=n1>
<tr><td>Jabatan<td> : <input name=jb1>
<tr><td>Gaji<td> : <input name=gaji>
<tr><td>Tunjangan<td> : <input name=t1>
<tr><td>Total Tunjangan<td> : <input name=tj>
<tr><td>Pajak<td> : <input name=pajak>
<tr><td>Total Gaji<td> : <input name=tg>
</table>
<hr size=3 color=black>
</html>
<script>
function proses ()
{
var n1=(document.form.n.value);
document.form.n1.value=n1;
var nip1=(document.form.nip.value);
document.form.nip1.value=nip1;
var jb1=(document.form.jb.value);
document.form.jb1.value=jb1;
var jb=document.form.jb.value;
if(jb=="Direktur") var gaji=12000000;
if(jb=="Manager") var gaji=10000000;
if(jb=="Sekretaris") var gaji=9000000;
document.form.gaji.value=gaji;
var t1=(document.form.t.value);
document.form.t1.value=t1;
var t1=(document.form.t1.value);
var t=document.form.t.value;
if(t=="Anak") var p=0.2;
if(t=="Istri") var p=0.2;
if(t=="Anak&Istri") var p=0.3;
var tj=gaji*p;
document.form.tj.value=tj;
var pajak=0.025*gaji;
document.form.pajak.value=pajak;
var tg=gaji+tj-pajak;
document.form.tg.value=tg;
}
</script>
simpan dengan akhiran .html