Innertext is used in the original webpage. Here, innerhtml is replaced by innerhtml for simple support of Firefox, because Firefox does not support innertext, but there is already a way for Firefox to support innertext, which is compatibleCodeAs follows.
Copy codeThe Code is as follows: // enable Mozilla to support innertext
Try {
Htmlelement. Prototype. _ definegetter __
(
"Innertext ",
Function ()
{
VaR anystring = "";
VaR Childs = This. childnodes;
For (VAR I = 0; I <Childs. length; I ++)
{
If (Childs [I]. nodetype = 1)
Anystring + = Childs [I]. tagname = "Br "? '\ N': Childs [I]. innertext;
Else if (Childs [I]. nodetype = 3)
Anystring + = Childs [I]. nodevalue;
}
Return anystring;
}
);
}
Catch (e ){}
The following code is implemented using innerhtml. For more information, you can test the time-based relationship on your own.Xmlns = "http://www.w3.org/1999/xhtml" XML: lang = "ZH-CN">
Loading data ......