VaR xmldoc = false;
VaR url = "index. aspx"
If (window. XMLHttpRequest)
{
Xmldoc = new XMLHttpRequest ();
If (xmldoc. overridemimetype)
{
Xmldoc. overridemimetype = ('text/xml ');
}
}
Else if (window. activexobject)
{
Xmldoc = new activexobject ("Microsoft. XMLHTTP ");
Try {
Xmldoc = new activexobject ("msxml2.xmlhttp. 3.0 ");
}
Catch (E)
{
Try {
Xmldoc = new activexobject ("Microsoft. XMLHTTP ");
}
Catch (E)
{}
}
}
If (! Xmldoc)
{
Alert ('error, abandon creating an XMLHTTP instance! ');
Xmldoc = false;
}
Xmldoc. Open ("Post", URL, true );
Xmldoc. onreadystatechange = complete;
Xmldoc. Send (null );
Function complete ()
{
VaR Doc = new document;
If (xmldoc. readystate = 0)
{
If (xmldoc. Status = 200)
{
VaR c = Doc. getelementsbytagname ("oloadbar ");
C. style. width = "1px ";
}
}
If (xmldoc. readystate = 1)
{
If (xmldoc. Status = 200)
{
VaR c = Doc. getelementsbytagname ("oloadbar ");
C. style. width = "80px ";
}
}
If (xmldoc. readystate = 2)
{
If (xmldoc. Status = 200)
{
VaR c = Doc. getelementsbytagname ("oloadbar ");
C. style. width = "160px ";
}
}
If (xmldoc. readystate = 3)
{
If (xmldoc. Status = 200)
{
VaR c = Doc. getelementsbytagname ("oloadbar ");
C. style. width = "240px ";
}
}
If (xmldoc. readystate = 4)
{
If (xmldoc. Status = 200)
{
VaR c = Doc. getelementsbytagname ("oloadbar ");
C. style. width = "300px"
Document. Location. href = "index. aspx"
}
}
}
It should be an error here, doc. getelementsbytagname ("oloadbar ");
The result is a set.
Document. getelementbyid