INPUT text input box:
FUNCTION
Tosum1 ()
{
Document.form1.text1.value = "ltp";
Document.form1.text2.Style.BackgroundColor = "# 669999";
}
Function selectText () {document.form1.textbox6.select ();
script>
lose focus:
Onblur = "
TOSUM1 () "
The mouse is coming, the movement is removed: οnmοuseοver = "b ()" οnmοuseοut = "h ()" (Button can also be used)
About other events View: HTMLINPUTTEXTELEMENTEVENTS DISPINTERFACE
Set HTML control:
This.Text1.Style ["Border-Top-style"] = "none"; this.text1.attributes ["readonly"] = "readonly";
Text6.attributes ["onclick"] = "SELECT ()";
In JS, some things that are not available are not available.
In Web projects, we sometimes need to click on a thing, something is not available. If implemented on the client. The simplest is to use disabled. Three of the following: Subsequent: Not available (Disabled); use a blank instead of this place (this area is empty). You can view this blog source file:
DADD
CCC
These three ways actually the core code is: obj.disabled = false; obj.style.visibility = "hidden"; obj.style.display = "none"; I put these three collected together, after searching for use .
Function ShowdisableObject (OBJ)
{
IF (Obj.disabled == False)
{
Obj.disabled = true;
}
Else {
Obj.disabled = false;
}
Var Coll = Obj.all.tags ("input");
IF (COLL! = NULL)
{
For (VAR i = 0; i { Coll [i] .disabled = obj.disabled; } } } Function ShowblankObject (OBJ) { IF (Obj.Style.visibility == "Hidden") { Obj.style.visibility = "visible"; } Else { Obj.style.visibility = "hidden"; } } Function ShownoneObject (OBJ) { IF (Obj.Style.Display == "None") { Obj.style.display = "block"; } Else { Obj.Style.Display = "none"; } } Script> Display-Possible Values blockObject is rendered as a block element. block elements (they wrap) noneObject is not rendered.inlineDefault. Object is rendered as an inline element sized by the dimensions of the content. flow element within (not wrapped) inline-blockObject is rendered inline, but the contents of the object are rendered as a block element. Adjacent inline elements are rendered on the same line, space permitting.list-item IE6 and later. Object is rendered as a block element, and a list-item marker is added. table-header-groupTable header is always displayed before all other rows and row groups, and after any top captions. The header is displayed on each page spanned by a table. table-footer-groupTable footer is always displayed after all other rows and row Groups, and before anybottom captions. The footer is displayed on each page spanned by a table. Hide HTML control: Document.xxx.style.display = "none"; TABLE use 1. ask: tablelow> asp: table> Set the font: Cell1.font.size = fontunit.smaller; style = "Border-collapse: collapse" property is a border that does not display the table, change to flat frame 2. Unit grid mouse movement effect οnmοuseοver = "javascript: this.bgcolor = '# ffddaa'" οnmοuseοut = "javascript: this.bgcolor = '# fffff5'" BGColor = "# fffff5"> TR> Specify a list of Japanese rules td>