<script language="javascript">
function f1(){
if(typeof(f2)!="function") alert("f2方法不存在")
if(typeof(f3)!="function") alert("f3方法不存在")
}
function f2(){
// ......
}
f1()
</script>
function f1(){
if(typeof(f2)!="function") alert("f2方法不存在")
if(typeof(f3)!="function") alert("f3方法不存在")
}
function f2(){
// ......
}
f1()
</script>
得到变量的类型,有"string" "function"等等