JS determine whether there is an object page

function check (strObj)
(
if (typeof (eval ("document.all." + strObj))! = "undefined")
(
alert (strObj + "is an object");
)
else
(
alert (strObj + "is not an object");
)
)

分类:Web 时间:2010-03-11 人气:193
本文关键词:
分享到:
blog comments powered by Disqus

相关文章

  • JS to determine whether there is an object page 2008-08-15

    function check (strObj) ( if (typeof (eval ( "document.all." + strObj))! = "undefined") ( alert (strObj + "is an object"); ) else ( alert (strObj + "is not an object"); ) )

  • determine the existence of the parent page js 2010-12-30

    When you have multiple pages within a iframe page, you certainly do not want people to open sub-pages directly to it! (Because the beauty of the site so that security is bad, if the security is insufficient to do)! Then teach you a method: The child

  • JS Array "(array) and the" objects "(object) 2010-08-24

    JS Array "(array) and the" objects "(object) JS Technology 2009-12-30 16:15:45 read 294 comments 0 font size: large, medium Subscribe For example there is an array a = [1,2,3,4], there is an object a = (0:1,1:2,2:3,3:4), and then you run th

  • js determine the character is Chinese, Chinese characters, numbers 2011-06-01

    / * Determines whether the specified content is empty, if the pop-up alert box is empty * / function isEmpty (theValue, strMsg) { if (theValue ==""){ alert (strMsg + "can not be null!"); return true; } return false; } / * Chinese judge

  • JS determine the integer 2010-12-21

    //JS Determine whether an integer .. if(num.value.search("^\\d+$") != 0){ ................ } // Whether positive or negative number if(num.value.search("^-?\\d+$") != 0){ ................ }

  • JS _ imitation of Windows right-click menu page code Station (www.webdm.cn) 2010-12-31

    <HTML> <HEAD> <title> JS _ imitation of Windows, right-click menu page code Station (www.webdm.cn) </ title> <STYLE Type=text/css> BODY { FONT-SIZE: 12px; } . Info {FONT-SIZE: 14px; color: # FFFFFF; font-family: @ Tahoma, @ A

  • JS determine the browser type (if using IE, Firefox, Opera browser) 2011-05-19

    Keywords: JS determine the browser (if using IE, Firefox, Opera browser), IE core, netscape kernel Now there are about several browser, the personal preferences are different, so it is to use a different browser! We have developed for people who ofte

  • js determine an object type in 2010-04-18

    1, typeof operator. For Function, String, Number, Undefined several types of objects that it does not have any problems, but nothing for the Array object to use the: alert (typeof null); / / "object" alert (typeof []) ; / / "object" 2,

  • JS to determine the radio button at the page to submit FORM has been selected before 2009-03-17

    <script language="javascript"> function Check () ( var checkNum = 0; for (i = 0; i <document.form1.t1.length; i + +) ( if (document.form1.t1 [i]. checked) ( checkNum + +; ) ) if (checkNum == 0) ( return false; ) else ( return true; ) )

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.232 (s). 12 q(s)