//
Original works:
By jimmy
Description: www.111cn.net
Note: For reprint, please describe it here
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN"
Http://www.w3.org/TR/html4/loose.dtd>
<Html>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> Untitled Document </title>
</Head>
<Script language = "javascript">
<! --
Function dom (obj ){
Var first = document. createElement ("input ");
Var div = document. getElementById (obj );
First. setAttribute ("value", "success ");
If (div. childNodes. length> = 5) {alert ('upload up to 5 files! '); Return false ;}
Div. appendChild (first );
}
Function del (parentnode ){
Var delnode = document. getElementById (parentnode );
Delnode. removeChild (delnode. lastChild );
}
Function creatediv (obj ){
Var divs = document. getElementById (obj );
Var txt = document. createElement ("div ");
Txt. setAttribute ("border", "1px solid red ");
Txt. setAttribute ("id", "");
Var texts = document. createTextNode ("<jimmy> ");
Txt. appendChild (texts );
Divs. appendChild (txt );
}
Function xml (){
Var xmlhttp = Try. these (
Function () {return new ActiveXObject ("MSXML2.XMLHTTP ");},
Function () {return new ActiveXObject ("Microsoft. XMLHTTP ");},
Function () {return new xmlhttpRequest ();}
) | False;
Alert (xmlhttp );
}
Var I = 0;
Function next (){
Var arr = Array ('1', '2', '3', '4', '5 ');
If (arr. length> 0 ){
If (I> = arr. length) {I = 0 ;}
Document. getElementById ("ttibm"). innerHTML = arr [0 + I]; I ++;
SetTimeout ('next () ', 100 );
}
}
// Next ();
Function test (){
Var obj = document. getElementById ("ttibm"). innerHTML;
Alert (obj );
}
-->
</Script>
<Style>
<! --
# A {background-color: #003399;
Border-bottom-color: #009966 ;}
--> </Style>
<Body>
<A href = "#" onClick = "dom ('t');"> CreateElement Nodes </a>
<A href = "#" onClick = "del ('t');"> RmoveElement Nodes </a>
<A href = "#" onClick = "creatediv ('t');"> div </a>
<A href = "#" onClick = "javascript: xml ();"> xmlhttp </a>
<Div id = "ttibm" onClick = "next ();"> ff </div>
</Body>
</Html>
This is a simple test I have done. For example, the attachment function is added to 163 mailbox.