try 
{
  你的function1
}
catch(e){ aler('不存在该函数!')}

解决方案 »

  1.   

    <script>
    function show(){
    aa=0;
    alert()
    }
    </script>
    <button onclick=alert(show==null)>Check</button>
      

  2.   

    <html>
    <head>
    <SCRIPT LANGUAGE="JavaScript" type="text/javascript">
    <!--
    function findMe()
    {
     alert('存在!')
    }if ( window.findMe )
    {
       findMe()
    }
    else
    {
        alert( '函数不存在' )
    }
    //-->
    </SCRIPT>
    </head>
    </html>
      

  3.   

    if (typeof fucntionname == "function")
      functionname();