pengdawei
2009-12-23 02:34:34 UTC
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.
<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.