how to get dom-node's attribute set by javascript code.
pengdawei <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <5DB86F6093A14E438EEDBA76F9FDA1F801863410E1@MAILCCR01.internal.baidu.com> |
javascript code:
<script>
function setuattr()
{
var div1 = document.getElementById("output");
div1.setAttribute ("zz0", "zz0-attribute");
div1.zz1 = "zz1-attribute";
}
</script>
<body onload="setuattr()">
<div id="output"></div>
when then page finished loading, I can get the zz0 attribute through nsIDOMElement interface in c++.
but I can't get the zz1 attribute.
in Firebug, the difference is:
zz0 is in dom node's attribute
<div id="output" zz0="zz0-attribute"/>
but zz1 is in Firebug's DOM panel, I checked firebug's code, and firebug get zz1 by using " for var a in object"
can any one tell me how to get zz1 attribute in C++?
thanks.