使用typeof判断function是否存在于上下文_javascript技巧