HTML Object Reference
1. 데모
HTMLObjectReference.html
2. 소스
<html>
<head>
<style>
<!--
TD
{
FONT: 8pt Verdana,굴림,Gulim;
LINE-HEIGHT: 16px;
}
BODY
{
FONT: 9pt Verdana,굴림,Gulim;
}
//-->
</style>
<body>
</body>
<script>
///
// muhwa, http://muhwa.webice.co.kr/ 의 소스 수정
JRefPathDiv=document.body.appendChild(document.createElement("div"));
with (JRefPathDiv.style){
position='';backgroundColor='#FFFFFF';marginBottom='4px';padding='3px'
}
JRefListDiv=document.body.appendChild(document.createElement("div"));
with (JRefListDiv.style){
backgroundColor='#FFFFFF';cursor='default'
}
JRefHistoryText=['window'];
JRefHistory=[window];
JRefHistory.pops = function (e) {
for(var x = 0; x < e; x++){
JRefHistory.pop()
JRefHistoryText.pop()
}
}
JRefListDraw();
function JRefListDraw(target){
var add,writeStrig=[''];
if(target) {
JRefHistoryText.push(target);
JRefHistory.push(target = JRefHistory[JRefHistory.length-1][target]);
}
obj = JRefHistory[JRefHistory.length-1];
if(JRefHistory.length>1)writeStrig.push('<tr><td 1 onclick="JRefHistory.pops(1);JRefListDraw()">..</td></tr>');
for(var s in obj){
try{
for(var tmp=false in obj[s]) {tmp=true;break;}
if(tmp) {
add = '2 onclick="JRefListDraw(\''+s+'\');" title="'+'" ><b';
}else {
add='3 style=color:blue';
}
if(obj[s] == window) add = '4>(win)<tmp';
inValue=(obj[s]+'').replace(/</g,"<");
}catch(e){add='5'; inValue='';}
writeStrig.push('<tr><td valign=top '+add+' >'+s+'</td><td>'+inValue+'</textarea></td></tr>');
}
JRefListDiv.innerHTML = '<table width=100% border=0 cellspacing=0 cellpading=0 style=table-layout:fixed>
<tr><td width=30%>Name</td><td width=70%>Value</td></tr><tr><td colspan=2><hr></td></tr>'+writeStrig.sort().join('')+"</table>";
JRefPathDraw();
}
function JRefPathDraw(target){
var str=[];
for (var x=0;x < JRefHistoryText.length; x++){
str.push('<a ondblclick="JRefHistory.pops('+(JRefHistoryText.length-x-1)+');JRefListDraw()">'+JRefHistoryText[x]+'</a>');
}
JRefPathDiv.innerHTML= "<b><u>Path : " +str.join('.')+"</u></b><p>";
}
</script>