Di bawah ini adalah cara membuat form mahasiswa dengan bahasa HTML:
<!doctype html>
<html>
<head>
<title>Form HTML</title>
</head>
<body>
<h2>Formulir Mahasiswa</h2>
<form method="post"action="aksi.php" enctype="text/plain">
<fieldset>
<legend>Kolom Biodata<?legend>
<table width="300">
<tr>
<td width="100">Nama</td>
<td><input type="text" size="30" name="name" value=""accesskey="n" tabindex="1"/><td>
</tr>
<tr>
<td valign="top">Alamat</td>
<td><textarea name="Alamat" cols="300" rows="5" accesskey="a" tabindex="2"></textarea>
</tr>
<tr>
<td width="200">Tempat/Tanggal Lahir</td>
<td><input type="text" size="30 TTL="TTL" value=""accesskey="n" tabindex="1"/><td>
</tr>
<tr>
<td valign="top">Golongan Darah</td>
<td>
<input type="radio" name="goldar" value="A" tabindex="3"/>A<br/>
<input type="radio" name="goldar" value="B" tabindex="3" checked=checked"/>B<br/>
<input type="radio" name="goldar" value="AB" tabindex="3"/>AB<br/>
<input type="radio" name="goldar" value="O" tabindex="3"/>O<br/>
</td>
</tr>
<tr>
<td valign="top">Hobby</td>
<td>
<input type="checkbox" name="hobby1" value="Main Musik" tabindex="4"/>Main Musik<br/>
<input type="checkbox" name="hobby2" value="Melukis" tabindex="5"/>Melukis<br/>
<input type="checkbox" name="hobby3" value="Fotografi" tabindex="6"/>Fotografi<br/>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>Informasi Akademik</legend>
<table>
<tr>
<td>NIM</td>
<td><input type="text" maxlength="8" size="10" name="nm" value=""/></td>
</tr>
<tr>
<td>Program Studi</td>
<td>
<select name="programstudi">
<option value="if">Teknik Informatika</option>
<option value="mi">Manajemen Informatika</option>
<option value="tk">Teknik Komputer</option>
</select>
</td>
</tr>
</table>
</fieldset>
<button name="button" type="button">Tombol Biasa</button>
<button name="submit" type="submit" value="kirim">Kirim</button>
<button name="reset" type="reset"> Reset</button><br/>
<input name="button" type="button2" type="button" value="Tombol Biasa"</button>
<input name="button" type="button2" type="button" value="Kirim"</buton>
<input name="button" type="button2" type="button" value="reset"</button>
<html>
<head>
<title>Form HTML</title>
</head>
<body>
<h2>Formulir Mahasiswa</h2>
<form method="post"action="aksi.php" enctype="text/plain">
<fieldset>
<legend>Kolom Biodata<?legend>
<table width="300">
<tr>
<td width="100">Nama</td>
<td><input type="text" size="30" name="name" value=""accesskey="n" tabindex="1"/><td>
</tr>
<tr>
<td valign="top">Alamat</td>
<td><textarea name="Alamat" cols="300" rows="5" accesskey="a" tabindex="2"></textarea>
</tr>
<tr>
<td width="200">Tempat/Tanggal Lahir</td>
<td><input type="text" size="30 TTL="TTL" value=""accesskey="n" tabindex="1"/><td>
</tr>
<tr>
<td valign="top">Golongan Darah</td>
<td>
<input type="radio" name="goldar" value="A" tabindex="3"/>A<br/>
<input type="radio" name="goldar" value="B" tabindex="3" checked=checked"/>B<br/>
<input type="radio" name="goldar" value="AB" tabindex="3"/>AB<br/>
<input type="radio" name="goldar" value="O" tabindex="3"/>O<br/>
</td>
</tr>
<tr>
<td valign="top">Hobby</td>
<td>
<input type="checkbox" name="hobby1" value="Main Musik" tabindex="4"/>Main Musik<br/>
<input type="checkbox" name="hobby2" value="Melukis" tabindex="5"/>Melukis<br/>
<input type="checkbox" name="hobby3" value="Fotografi" tabindex="6"/>Fotografi<br/>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>Informasi Akademik</legend>
<table>
<tr>
<td>NIM</td>
<td><input type="text" maxlength="8" size="10" name="nm" value=""/></td>
</tr>
<tr>
<td>Program Studi</td>
<td>
<select name="programstudi">
<option value="if">Teknik Informatika</option>
<option value="mi">Manajemen Informatika</option>
<option value="tk">Teknik Komputer</option>
</select>
</td>
</tr>
</table>
</fieldset>
<button name="button" type="button">Tombol Biasa</button>
<button name="submit" type="submit" value="kirim">Kirim</button>
<button name="reset" type="reset"> Reset</button><br/>
<input name="button" type="button2" type="button" value="Tombol Biasa"</button>
<input name="button" type="button2" type="button" value="Kirim"</buton>
<input name="button" type="button2" type="button" value="reset"</button>
Form Mahasiswa>>
By: AdheCrew
3 komentar:
keterangan masukan untuk data nya kemana yaa ?
Kak ada cara yg lainnya nggak, cara yg lebih mudah dan sedikit biar nggak terlalu panjang
Terima kasih
Kak ada cara yg lainnya nggam, cara yang lebih mudah dan simple biar nggak terlalu panjang. Terima kasih
Nama: Yulinda Sari
Kelas: SI.2K
Dan link web kampus saya
https://www.atmaluhur.ac.id/
Posting Komentar