1. Form Isi Manual
script program :
<html>
<body>
<form action="register.php" method="get">
<p> First name : <input type=”text” name=”first name” />
<p> Last name : <input type=”text” name=”last name” />
<p> Pekerjaan :
<select name=Pekerjaan>
<option value=Pelajar>Pelajar/Mahasiswa
<option value=PNS>Pegawai Negeri Sipil
<option value=Karyawan>Karyawan
<option value=Wiraswasta>Wiraswasta
</select>
<p><input type=submit value=kirim /><input type=reset value=ulang>
</form>
</body>
</html>
output:
Output form isi manual |
2. Form Lengkap
script program :
<html>
<head>
<title bgcolor="Black">Contoh pembuatan Form</title>
</head>
<body>
<form action="prosesinput.php" method="get">
<p> First name : <input type="text" name=”first name” /><br/>
<p> Last name : <input type="text" name=last name” />
<p> Password : <input type="password" name="psw"/>
<p> Jenis kelamin : <input type =radio name=”sex value=”male”/> Male
<input type =radio name=”sex value=”female”/> Female
<p> Alamat : <textarea name="Alamat" cols="25" rows="4"></textarea>
<p> Hobi :
<input type=checkbox name=hobi value=Membaca>Baca Buku
<input type=checkbox name=hobi value=Kesenian>kesenian
<input type=checkbox name=hobi value=olahraga>Olahraga
<input type=checkbox name=hobi value=Traveling>Jalan Jalan
<p> Pekerjaan :
<select name=Pekerjaan>
<option value=Pelajar>Pelajar/Mahasiswa
<option value=PNS>Pegawai Negeri Sipil
<option value=Karyawan>Karyawan
<option value=Wiraswasta>Wiraswasta
</select>
<p>Komentar : <textarea name="komentar" cols="25" rows="4"></textarea>
<p><input type=submit value=kirim data/><input type=reset value=ulang>
</form>
</body>
</html>
output:
Contoh form yang umum |
3. Form link
script program :
<html>
<body>
<form action="/action_page.php">
First name:<br>
<input type="text" name="firstname" value="Mickey">
<br>
Last name:<br>
<input type="text" name="lastname" value="Mouse">
<br><br>
<input type="submit" value="Submit">
</form>
<p>If you click the "Submit" button, the form-data will be sent to a page called "/action_page.php".</p>
</body>
</html>
output:
Outputnya |
Berikut 3 contoh script program HTML tentang form, semoga artikel ini bermanfaat.
No comments:
Post a Comment