Kode buku tamu anda letakan disini

.

.

Rabu, 02 April 2014

membuat form sederhana


FORM SEDERHANA

1
2
3
4
<form>
Username: <input type="text" name="username" /><br />
Password: <input type="password" name="password" />
</form> <br><br>Maka akan jadi seperti ini:<br><br>
Top of Form
Username:
Password:
Bottom of Form
Top of Form
Bottom of Form
Top of Form
Bottom of Form
Top of Form
*note: jika ingin membuat form password, typenya harus password, agan saat di input menjadi simbol bukan menjadi huruf
Bottom of Form
Top of Form
Bottom of Form
Top of Form
Bottom of Form
Top of Form

FORM PILIHAN
Bottom of Form
Top of Form
cara membuat form pilihan, contoh ingin membuat form untuk menentukan jenis kelamin
Bottom of Form
Top of Form
Bottom of Form
Top of Form
Bottom of Form
Top of Form
1
2
3
4
<form>
<input type="radio" name="sex" value="laki laki" /> Laki Laki<br />
<input type="radio" name="sex" value="perempuan" /> Perempuan
</form> <br><br><br>Maka akan jadi seperti ini<br><br>
Bottom of Form
Top of Form
laki laki
Perempuan
Bottom of Form
Top of Form
Bottom of Form
Top of Form
Bottom of Form

Top of Form
FORM CHECKBOX
Bottom of Form
Top of Form
Form Checkbox sangat berguna untuk membuat polling yang jawabannya bisa lebih dari 1. Contoh codenya
Bottom of Form
Top of Form
Bottom of Form
Top of Form
Bottom of Form
Top of Form
1
2
3
4
<form>
<input type="checkbox" name="test" value="juned" /> Saya juned<br />
<input type="checkbox" name="test" value="Ujang" /> Saya ujang
</form> <br><br><br>Maka akan jadi seperti ini<br> 
Bottom of Form
Top of Form
saya Juned
Saya ujang
Bottom of Form
Top of Form
Bottom of Form
Top of Form
Bottom of Form




Top of Form
Submit Button
Bottom of Form
Top of Form
Submit button sangat berpengaruh pada form, Karena submit button yang akan mengirimkan semua hasil dari formnya contoh code:
Bottom of Form
Top of Form
Bottom of Form
Top of Form
Bottom of Form
Top of Form
1
2
3
4
<form name="input" action="index.php" method="get">
Username: <input type="text" name="user" />
<input type="submit" value="Submit" />
</form> <br><br>Maka akan jadi seperti ini:<br><br>
Bottom of Form
Top of Form
Username:
Bottom of Form

Contoh Form 1:
Ini contoh form buatan saya
codenya:

1
2
3
4
5
6
7
8
9
10
<form>
  <span id="a2434rh_4" class="a2434rh">First name</span>: <input type="text" name="firstname" /><br />
  Last name: <input type="text" name="lastname" /><br />
  username: <input type="text" name="firstname" /><br />
  Password: <input type="password" name="pwd" /><br />
  Gender: <br />
  <input type="radio" name="sex" value="male" /> Male<br />
  <input type="radio" name="sex" value="female" /> Female<br />
  <input type="checkbox" name="agreement" value="agree" /> I Agree with <a href="#">Terms</a> and <a href="#">Condition</a><br />
  <input type="submit" value="Register" /></form><br><br><br>Menjadi:<br><br>
Top of Form
First name:
Bottom of Form
Top of Form

Last name:
Bottom of Form
Top of Form

username:
Bottom of Form
Top of Form

Password:
Bottom of Form
Top of Form

Gender:
Male
Female
Bottom of Form
Top of Form

I Agree with Terms and Condition
Bottom of Form

Bottom of Form