A new window is opened, with a table listing all available properties with values for your object.
- Make a new file called props.htm. This file should be completely empty.
- Paste the following JavaScript function into your page, or into a JavaScript library file.
- Call the function and pass it an object reference - for example props(document.all["myId"])
function props(o) {
var s = ""
for (var p in o) {
s = s + "<tr><td>" + p + "</td><td>" + o[p] + "<td></tr>"
}
var b=window.open("props.htm","c","")
s = "Properties list for the object:<BR><BR><table border='1'>" + s + "</table></body></HTML>"
s = "<HTML><HEAD><TITLE>Object Properties List</TITLE></HEAD><body>" + s
b.document.write(s)
}