Apr 8

Javascript: 如何判断是否存在某个函数或方法 不指定

felix021 @ 2008-4-8 16:18 [IT » 网络] 评论(0) , 引用(0) , 阅读(4591) | Via 本站原创 | |
from http://topic.csdn.net/t/20060905/14/4999773.html
function ttt() {alert(1);}

if (typeof(ttt) == "function")
    alert("yes");
else
    alert("no");




欢迎扫码关注:




转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php
Tags:
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   *非必须
网址   电邮   [注册]