Continuation of PHP and Form HTML Part 2....
Elements of Form HTML
Tehre are 11 elements, they are:
1. Text Fields
2. Password Fields
3. Hidden Input Element
4. Check Box
5. Radio Button
6. Push Button
7. Submit Button
8. Image Submit Button
9. Text Area
10. Reset Button
11. Select
1. Text Fields
Text box is use to input data text. Below is basic script of text fields.
<input type="text" name="nameoftextfields"/>
Below is output of script above.
Username:
2. Password Fields
Password fields is use to input data password. Below is basic script of text fields.
<input type="password" name="nameofpassword"/>
Below is output of script above.
Password:
3. Hidden Input Element
Hidden Input Element is use to send data visible in form. Below is basic script of Hidden Input Element.
<input type="hidden" name="nameofhidden"/>
Not output because it is visible.
4. Check Box
Check Box is use to input data using check box like multiple choice. Below is script of Check Box.
<input type=" checkbox" name="choice1"/>
<input type=" checkbox" name="choice2"/>
Below is output of script above.
I like apple
I like orange
5. Radio Button
Radio Button is use to input data like single choice. Below is script of Radio Button.
<input type="radio" name="male"/>
<input type="radio" name="female/>
Below is output of script above.
Male
Female
6. Push Button
Push Button is use to do a certain actions in web page. Below is basic script of Push Button.
<input type="button" name="nameofbutton"value="Button"/>
Below is output of script above.
7. Submit Button
Submit Button is use to send data in form to server. Below is basic script of Submit Button.
<input type="submit" name="nameofsubmit" value="Send"/>
Below is output of script above.
8. File Fileds
File Fileds is use to insert data file (image, file, etc) in form and send to server. Below is basic script of File Fileds.
<input type="file" name="nameoffile" />
Below is output of script above.
9. Text Area
Text Area is use to input data text same with text fields. Below is basic script of Text Area.
<textarea name="nameoffile"></textarea>
Below is output of script above.
10. Reset Button
Reset Button is use to reset data in form before send. Below is basic script of Reset Button.
<input type="reset" value="Reset"/>
Below is output of script above.
11. Select
Select is use to input data is already available in select element. Below basic script of Select.
<select name="fruit">
<option value="0">--Pilih Buah--</option>
<option value="ap">Apple</option>
<option value="ora">Orange</option>
<option value="gra">Grape</option>
<option value="strw">Strawberry</option>
</select>
Thanks for visiting and reading my article. I hoop this article can be hlep you...
Learn and learn again...
No comments:
Post a Comment