Posted in Javascript onJuly 15, 2009
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>javascript object</title> <body> <input id="aaa"> <input type=button onclick="check('aaa')" value="checkaaa"> <input type=button onclick="check('aaffdssfg')" value="checkother"> <script language="javascript"> <!-- function check(strObj) { if(typeof(eval("document.all."+strObj))!= "undefined") { alert(strObj +" is an object"); } else { alert(strObj +" is not an object"); } } //--> </script> </body>
js 对象是否存在判断
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@