Upload objects to Javascript

Source: Internet
Author: User

Upload objects to Javascript

 
Over the past one year when I used. Net to develop Web applications, I think JavaScript has no charm and utility. Today, I have made some mistakes to JavaScript...

1. There is a plane that needs to be added to the animation of another dropdownlist through the first line of a textbox. The correlation method is as follows:

Function rat (OBJ, obq)
{
// Alert (OBJ );
VaR XH = new activexobject ("Microsoft. XMLHTTP ");
XH. Open ("Post", "qas03.aspx? Ckind = "+ OBJ, false );
XH. Send ();
// Alert (XH. responsetext );
// Obq. value = XH. responsetext;
VaR sta = XH. responsetext;
Obq. Options. Length = 0;
// Alert (STA );

VaR opt = Sta. Split (",");
VaR TT = opt. Length-1;
VaR ope = new array (1 );

If (STA = 0)
{Alert ("irrelevant subject-type information! ");}
Else {
For (VAR I = 0; I <tt; I ++)
{
OPE = OPT [I]. Split ("? ");
// Alert (OPT [I]);

Obq. Add (document. createelement ("option "));
Obq. Options [I]. Text = ope [1];
Obq. Options [I]. value = ope [0];
}
Obq. selectedindex = 0;

}

}

P.s. The above uses the XMLHTTP technique to clear and add drop-down lists, and uses substring to intercept strings (it is a great deal of optimization :))

2. Control of the number of rows in the cursor (The following is the Special encryption method for textbox in the DataGrid)

<Script language = "JavaScript" src = "../main/escapekey. js"> </SCRIPT>
<Script language = "JavaScript">
Function OBC (IB)
{
VaR E = event. srcelement;
VaR ROW = E. parentnode. parentnode;
VaR txts = row. All. Tags ("input ");
Return txts [IB];
}

Test Point: escapekey. js letter number test (http://search.csdn.net/Expert/topic/1039/1039072.xml ?) Temp =. 9776728.

 

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.