Tuesday, May 23, 2017

Membuat Kalkulator HTML



Ini Scriptnya :


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Kalkulator</title>

</head>
<body>
<br />
<center><b><h3><font>Calculator</font></h3></b></center>
<pre>
<form method="post" action="" name="cal">
<table border="1" align="center">
<tr>
<td width="240" height="110">
<br />
<center><input type="text" name="ang1" size="27"/> <br /><br />

<input type="reset" name="reset" value="C" style="width:165px;height:40px;"/> <input type="button" name="angka7" value="/" style="width:50px;height:40px;" onclick="cal.ang1.value += '/'"/> <br /><br />

<input type="button" name="angka7" value="7" style="width:50px;height:40px;" onclick="cal.ang1.value += '7'"/>
<input type="button" name="angka8" value="8"  style="width:50px;height:40px;" onclick="cal.ang1.value += '8'"/>
<input type="button" name="angka9" value="9"  style="width:50px;height:40px;" onclick="cal.ang1.value += '9'"/>

<input type="button" name="bagi" value="*"  style="width:50px;height:40px;" onclick="cal.ang1.value += '*'"/> <br /><br />

<input type="button" name="angka4" value="4" style="width:50px;height:40px;" onclick="cal.ang1.value += '4'"/>
<input type="button" name="angka5" value="5"  style="width:50px;height:40px;" onclick="cal.ang1.value += '5'"/>
<input type="button" name="angka6" value="6"  style="width:50px;height:40px;" onclick="cal.ang1.value += '6'"/>

<input type="button" name="kali" value="-"  style="width:50px;height:40px;" onclick="cal.ang1.value += '-'"/> <br /><br />

<input type="button" name="angka1" value="1" style="width:50px;height:40px;" onclick="cal.ang1.value += '1'"/>
<input type="button" name="angka2" value="2"  style="width:50px;height:40px;" onclick="cal.ang1.value += '2'"/>
<input type="button" name="angka3" value="3"  style="width:50px;height:40px;" onclick="cal.ang1.value += '3'"/>

<input type="button" name="kurang" value="+"  style="width:50px;height:40px;" onclick="cal.ang1.value += '+'"/> <br /><br />

<input type="button" name="angka0" value="0" style="width:165px;height:40px;" onclick="cal.ang1.value += '0'"/>

<input type="button" name="DoIt" value="=" style="width:50px;height:40px;" onclick="cal.ang1.value = eval(cal.ang1.value)"></center> <br /><br />
</td>
</tr>
</table>
</pre>
</form>
</body>
</html>

Thursday, April 20, 2017

Membuat Form di HTML


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Form Registrasi</title>

</head>
<body>
<table border="1" align="center">
<tr>
<td width="700">
<br />
<font align="center"><h3>Form Registrasi</h3></font>
<hr />
<pre>
<form method="" action="" name="reg">
<label for="nim">NIM    : </label><input type="text" name="nim" value=""/><br />
<label for="nama">NAMA    : </label><input type="text" name="nama" value=""/><br />
<label for="jk">Jenis Kelamin   : </label><input type="radio" name="jk" value="" />Laki-laki <input type="radio" name="jk" value="" />Perempuan <br />
<label for="asl">Asal    : </label><select name="asl">
<option value="Jambi" selected="selected">Jambi</option>
<option value="Jakarta" selected="selected">Jakarta</option>
<option value="Lampung" selected="selected">Lampung</option>
<option value="Lampung" selected="selected">Bandung</option>
<option value="Lampung" selected="selected">Medan</option>
</select> <br />
<label for="tlp">No Telp    :</label> <input type="text" name="tlp" value="" /><br />
<label for="ala">Alamat Email    :</label> <input type="text" name="ala" value="" /><br />
<label for="pass">Password    :</label> <input type="text" name="pass" value="" /><br />
<label for="hby">Hobby      :</label> <input type="checkbox" name="hby" value="" /> Sepakbola  <input type="checkbox" name="hby" value="" /> Membaca
 <input type="checkbox" name="hby" value="" /> Futsal     <input type="checkbox" name="hby" value="" /> Jogging
 <input type="checkbox" name="hby" value="" /> Berenang   <input type="checkbox" name="hby" value="" /> Gowes
<br />
<label for="dd">Deskripsi Diri  :</label>
<textarea name="txt" rows="5" cols="22"></textarea><br />
</pre>
<hr />
<table>
<tr>
<td  align="center" width="800" height="30">
<input type="button" name="ok" value="OK"/> <input type="button" name="can" value="Cancel" />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>