We can check the existence of a function by Window.FunctionName as shown below, where the FunctionName is the name of the function,whose existence has to be checked.
<SCRIPT LANGUAGE='JavaScript' type='text/javascript'>
functionCheckIfExists()
{
alert(’FunctionExists’)
}
if( window.CheckIfExists)
{
CheckIfExists()
}
else
{
alert( Function Not Exists!’ )
}
</SCRIPT>
Share with