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.