Http://www.56ui.com/blog/article.asp? Id = 128

Source: Internet
Author: User

The background of the input box is transparent:
<Input style = "Background: transparent; Border: 1px solid # ffffff">

Hover the mouse over the input box, and the background color of the input box changes accordingly:
<Input value = "type here" name = "user_pass" type = "text" size = "29" onmouseover = "this. style. bordercolor = 'black'; this. style. backgroundcolor = 'plum '"
Style = "width: 106; Height: 21"
Onmouseout = "This. style. bordercolor = 'black'; this. style. backgroundcolor = '# ffff'" style = "border-width: 1px; border-color = black">

When you enter a word, the border of the input box is blinking (the border is a small square ):
<Script language = "JavaScript">
Function bordercolor (){
If (Self ['text']. style. bordercolor = 'red '){
Self ['text']. style. bordercolor = 'yellow ';
} Else {
Self ['text']. style. bordercolor = 'red ';
}
Otime = setTimeout ('bordercolor () ', 400 );
}
</SCRIPT>
<Input type = "text" id = "otext" style = "border: 5px dotted red; color: Red" onfocus = "bordercolor (this ); "onblur =" cleartimeout (otime); ">

When you enter a word, the border of the input box blinks (the border is a dotted line ):
<Style>
# Otext {border: 1px dotted # ff0000; Ryo: expression (onfocus = function light () {with (document. all. otext) {style. bordercolor = (style. bordercolor = "# ffee00 "? "# Ff0000": "# ffee00"); timer = setTimeout (light, 500) ;}, onblur = function () {This. style. bordercolor = "# ff0000"; cleartimeout (timer )})};
</Style>
<Input type = "text" id = "otext">

Input box for automatic horizontal tinting:
<Input type = "text" style = "huerreson: expression (this. width = This. scrollwidth)" value = "abcdefghijk">

Text Box automatically stretched down:
<Textarea name = "content" rows = "6" Cols = "80" onpropertychange = "If (this. scrollheight> 80) This. style. posheight = This. scrollheight + 5 "> enter a few carriage returns and try </textarea>

Text Box with only underlines:
<Input style = "border: 0; border-bottom: 1 solid black; Background:;">

Input box of the software serial number type:
<Script for = "T" event = "onkeyup">
If (value. Length = 3) document. All [event. srcelement. sourceindex + 1]. Select ();
</SCRIPT>
<Input name = "T" size = "5" maxlength = "3">-<input name = "T" size = "5" maxlength = "3">-<Input name = "T" size = "5" maxlength = "3">-<input name = "T" size = "5" maxlength = "3">-<input name = "T" size = "5"
Maxlength = "3">-<input name = "T7" size = "5" maxlength = "3">

Software serial number input box (full version ):
<Script for = "T" event = "onkeyup"> If (value. length = maxlength) document. all [event. srcelement. sourceindex + 1]. focus (); </SCRIPT>
<Script for = "T" event = "onfocus"> select (); </SCRIPT>
<Script for = "Submit" event = "onclick">
VaR Sn = new array ();
For (I = 0; I <t. length; I ++)
Sn = T. value;
Alert (SN. Join ("-"));
</SCRIPT>
<Input name = "T" size = "5" maxlength = "3">-<input name = "T" size = "5" maxlength = "3">-<Input name = "T" size = "5" maxlength = "3">-<input name = "T" size = "5" maxlength = "3">-<input name = "T" size = "5"
Maxlength = "3">-<input name = "T" size = "5" maxlength = "3">
<Input type = "Submit" name = "Submit">

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.