Html: Difference between revisions

From 太極
Jump to navigation Jump to search
Line 41: Line 41:


== PHP ==
== PHP ==
{| style="background:#cccc99;color:black;width:80%;" border="1"
cellpadding="5" cellspacing="0" align="center"
|+ Story Listing
!# !! Story Title !! Author !! Submission Date
|- style="background:white; color:black"
! 1.
| style="width:300px" |The Ghost of the Old Mathematician
| J. David
| 12/09/2006
|- style="background:#f0f0f0; color:black"
! 2.
| The little Mummy
| W. Patricia
| 13/09/2006
|- style="background:white; color:black"
! 3.
| The Guest
| S. Steve
| 13/09/2006
|- style="background:#f0f0f0; color:black"
! 4.
| A true story
| W. Henry
| 15/09/2006
|- style="background:white; color:black"
! 5.
| Nightmare
| M. Rahman
| 17/09/2006
|}


== CGI/Perl ==
== CGI/Perl ==

Revision as of 14:35, 16 November 2012

Some useful HTML tags about form

http://www.w3schools.com/html/html_forms.asp

form

<form action="demo_form.asp">
First name: <input type="text" name="FirstName" value="Mickey"><br>
Last name: <input type="text" name="LastName" value="Mouse"><br>
<input type="submit" value="Submit">
</form>

radio button label and input

<form action="demo_form.asp">
  <label for="male">Male</label>
  <input type="radio" name="sex" id="male" value="male"><br>
  <label for="female">Female</label>
  <input type="radio" name="sex" id="female" value="female"><br>
  <input type="submit" value="Submit">
</form>

dropdown list select and option

<select>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select>

div

<div style="color:#0000FF">
  <h3>This is a heading in a div element</h3>
  <p>This is some text in a div element.</p>
</div>

PHP

cellpadding="5" cellspacing="0" align="center"
Story Listing
# Story Title Author Submission Date
1. The Ghost of the Old Mathematician J. David 12/09/2006
2. The little Mummy W. Patricia 13/09/2006
3. The Guest S. Steve 13/09/2006
4. A true story W. Henry 15/09/2006
5. Nightmare M. Rahman 17/09/2006

CGI/Perl