Original: added the attachment function to the 163 mailbox

Source: Internet
Author: User

//

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.

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.