javascript|參考|對象
將下面代碼拷貝到一個HTM頁面即可,代碼如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JAVASCRIPT對象</title>
<style>
<!--
body { font-family: Verdana; font-size: 11px }
th { font-family: Verdana; font-size: 11px;padding:3px;color:#FFFFFF;background-color:#999999;}
td { font-family: Verdana; font-size: 11px;padding:3px;background-color:#EFEFEF;}
-->
</style>
</head>
<BODY style="overflow:auto;" topmargin=2 bgcolor=buttonface>
<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RealPlayer width=0 height=0></OBJECT>
<button >document</button>
<button >navigator</button>
<button >event</button>
<button >Window</button>
<button >location</button>
<button >RealPlayer</button>
<A HREF="http://www.webjx.com/" title="連結文字" >連結文字</A>
<IMG onclick=get(this) SRC="C:/Documents and Settings/Administrator.CHANGEGATE/案頭/Data_1.gif" style="width:10">
<INPUT TYPE="submit" onclick=get(this)>
<script defer>
function get(obj)
{
var Str="<table border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#000000\">"
for(var i in obj)
//if (obj[i]!=null&obj[i]!="[object]")
Str+="<tr><td>"+i+"</td><td>"+obj[i]+" </td></tr>\n"
Str+="</table>"
showzone.innerHTML = (Str)
}
</script>
<br>
<div id=showzone></div>
</BODY>
</HTML>