1. Leading blank leading blank in innerhtml of IE6, IE7, and IE8 will not retain leading blank var DIV = document. createelement ('div '); Div. innerhtml = "<div> </div>"; return Div. firstchild. nodetype = 3 ;}
2, tbodyie6, IE7 will automatically add tbodyfunction tbody () {var DIV = document. createelement ('div '); Div. innerhtml = "<Table> </table>"; Return !! Div. getelementsbytagname ('tbody'). length ;}
3. getattribute of href, SRC, width, heightie6, and IE7 will return formatted href, SRC, width, height. the getattribute of IE has two parameters. If the second parameter is set to 2, the specified parameter is strictly returned.
4. The default function checkon () {var DIV = document. createelement ('div '); Div. innerhtml = '<input type = "checkbox"/>'; var input = div. getelementsbytagname ('input') [0]; return input. value = 'on ';}
5. clonecheckedie does not copy the checked attribute function clonechecked () {var DIV = document. createelement ('div '); Div. innerhtml = '<input type = "checkbox"/>'; var input = div. getelementsbytagname ('input') [0]; input. checked = true; return input. clonenode (true ). checked ;}
6. Check whether the selected Attribute of the selected option is trueie and falsefunction optselected () {var select = document. createelement ('select'); var opt = select. appendchild (document. createelement ('option'); Return OPT. selected ;}
7. optdisabled: checks whether option is disabled when select is disabled. If false is disabled, falsefunction optdisabled () {var select = Document is returned. createelement ('select'); var opt = select. appendchild (document. createelement ('option'); select. disabled = true; return OPT. disabled ;}
Compatibility Test (1)