<Form action = "#" method = "Post" name = "myform" id = "myform">
<Div class = "Bo"> <label for = "name"> name: </label>
<Input type = "text" size = "20" name = "name" id = "name" maxlength = "10"/> </div>
<Div class = "Bo"> <label for = "tel"> Tel: </label>
<Input type = "text" size = "20" name = "tel" id = "tel" maxlength = "16"/> </div>
<Div class = "Bo"> <label for = "Mo"> topic: </label>
<Input type = "text" size = "30" name = "Mo" id = "Mo" maxlength = "20"/> </div>
<Div class = "Bo"> <label for = "con"> content: </label>
<Textarea Cols = "40" rows = "8" name = "con" id = "con"> </textarea> </div>
<Div class = "btcenter"> <input type = "Submit" class = "BT" value = "send"/>
& Nbsp; <input type = "reset" class = "BT" value = "reset"/> </div> </form>
CSSCode
FORM {margin: 0px auto; width: pixel PX; Border: solid 1px # cccccc ;}. bo {border-bottom: solid 1px # cccccc;} label {float: Left; padding: 10px 0px 4px 30px;} input {padding: 1px;} input, textarea {border: 1px solid # cccccc; margin: 5px 0px;} textarea {padding: 2px ;}. BT {width: 38px; Height: 20px; font-size: 11px; Border: solid 1px # cccccc; Background: # fbfbfb; text-align: center ;}. btcenter {text-align: center; clear: Left; padding: 4px 0px 0px ;}. sffocus {Background: # f0f9fb;/* ---- for IE ---- */Border: 1px solid #1d95c7;} textarea: focus, input: Focus {Background: # f0f9fb; /* ---- for Firefox ...... ---- */Border: 1px solid #1d95c7;} body {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #666666; margin-top: 20px ;}
Suckerfish. js Original Author: htmldog.com JS Code is mainly for IE, ie does not support focus, Firefox, NS... No. For details, go to the author's homepage. .
function suckerfish (type, Tag, parentid) {
If (window. attachevent) {
window. attachevent ("onLoad", function () {
var sfels = (parentid = NULL )? Document. getelementsbytagname (TAG): Document. getelementbyid (parentid ). getelementsbytagname (TAG);
type (sfels);
}< BR >}< br> sffocus = function (sfels) {
for (VAR I = 0; I sfels [I]. onfocus = function () {
This. classname + = "sffocus";
}< br> sfels [I]. onblur = function () {
This. classname = This. classname. replace (New Regexp ("sffocus \ B"), "");
}< BR >}< br> suckerfish (sffocus, "input");
suckerfish (sffocus, "textarea");