本对象浏览器可列出IE的绝大部分对象及属性
点击对象名可查看本对象内容..
有不完善之处,请各位指正
QQ:3960937
Mail:fsca@21cn.com
MSN:vlike@msn.com
===============================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Object Viewer For IE</TITLE>
<style>
mtd{font-size:12px}
</style>
</HEAD>
<BODY onclick="getChil();">
<INPUT TYPE="text" id="obj" value="window" onclick="this.select();">
<INPUT TYPE="button" id="goView" onclick="showObject(obj.value);" value="查看">
<INPUT TYPE="button" onclick="rtParent()" value="返回">
<SCRIPT LANGUAGE="JavaScript">
<!--
//................................
//Author:skimeister|fsca@21cn.com
//2002-5-21
//................................
//Enter the child
function getChil()
{
if(eval(event.srcElement.isOBJ))
{
objVal=obj.value+"."+event.srcElement.innerText;
obj.value=objVal;
showObject(obj.value);
}
}//getChil
//Kill the lt.gt tag
function process(val)
{
try
{
if(val!="" && isNaN(val))
{
lt=/</g;
rt=/>/g;
val+=" ";
val=val.replace(lt,"<");
val=val.replace(rt,">");
}//end if
}//end try
catch(e)
{
val="[空]";
}
return val;
}//process
//return parent
function rtParent()
{
var mValue="";
mObj=obj.value;
mObj=mObj.split(".");
mLength=mObj.length-1;
for(i=0;i<mLength;i++)
{
mValue==""?mValue=mObj[i]:mValue+="."+mObj[i];
}
mValue==""?mValue="window":"";
obj.value=mValue;
showObject(mValue);
}//rtParent
//show object
function showObject(TextObj)
{
var htmls="";
var obj=eval(TextObj);
var mbg="";
var isObj=false;
var j=0;
try
{
for(i in obj)
{
j++;
try
{
obj[i]=="[object]"?mbg="#D8D8EB":mbg="";
obj[i]=="[object]"?isObj=true:isObj=false;
}
catch(e)
{
//alert("对不起!!程序未完善或\n此对象存在问题\n错误类型:"+e.message);
}
peStr=process(obj[i]);
htmls+="<tr bgcolor='"+mbg+"'><td width='5'>"+j+"</td><td isOBJ='"+isObj+"'>"+i+"</td><td>"+peStr+" </td></tr>";
}
}//end TRY
catch(e)
{
alert("访问对象出错/程序未善,请指教\nfsca@21cn.com");
}
htmls=""
+"<table border='1'><tr><td colspan='3' bgcolor='#CCCCCC' align='center'>"
+TextObj
+"</td>"
+htmls
+"</table>";
showPLAN.innerHTML=htmls;
}//showObject
//-->
</SCRIPT>
<span id="showPLAN"></span>
<div align="center" style="font-size:12px;background-color:#F7F7F7">Power By <a href="fsca@21cn.com
mailto:fsca@21cn.com">fsca@21cn.com</a></div>
</BODY>
</HTML>