Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Attribute for <INPUT ...>
CHECKED

CHECKED indicates that a radio button or checkbox should be on when the form first loads.

this code produces this
<FORM ACTION="../cgi-bin/mycgi.pl">

<INPUT TYPE=CHECKBOX NAME="maillist" CHECKED>Yes! Put me on the list!

<P><INPUT TYPE=SUBMIT VALUE="submit">
</FORM>
Yes! Put me on the list!

<FORM ACTION="../cgi-bin/mycgi.pl">

What color would you like?<BR>
<INPUT TYPE=RADIO NAME="color" VALUE="green"         >Green<BR>
<INPUT TYPE=RADIO NAME="color" VALUE="red"           >Red<BR>
<INPUT TYPE=RADIO NAME="color" VALUE="blue"  CHECKED >Blue<BR>
<INPUT TYPE=RADIO NAME="color" VALUE="brown"         >Brown


<P><INPUT TYPE=SUBMIT VALUE="submit">
</FORM>
What color would you like?
Green
Red
Blue
Brown

Checkboxes are off by default. There is no default for which radio button is on when the form loads; most browsers have none on, some put the first one on.

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire