<Meta name = "author" content = "theforever (bihai Qing Tian), Zhao Liang">
<Meta http-equiv = "email" content = "theforever · 163. Com ">
<Meta http-equiv = "blog" content = "blog.csdn.net/theforever">
<! -- Author: theforever, ZL, bihai Qing Tian, Zhao Liang on csdn -->
Enter the HTML tag for listing all attributes and events: <input type = "text" id = "txtobjstr"> <input type = "button" onclick = "listattr (txtobjstr. value); "value =" list attributes ">
<SCRIPT>
Function listattr (objstr)
{
VaR OBJ = Document. createelement (objstr );
VaR Pa = new array ();
For (VAR prop in OBJ) {Pa. Push (PROP );}
Pa. Sort ();
Document. getelementbyid ("showhere"). innerhtml = "";
For (VAR I = 0; I <Pa. length; I ++) {objstr + = pa [I] + "<br> ";}
Document. getelementbyid ("showhere"). innerhtml = objstr;
}
</SCRIPT>
<Div id = "showhere" style = "border: 1px solid blue; font-weight: bold;"> </div>