js判断方法是否存在 有个方法:
function test(){}
typeof test!='undefined'
testinstanceof Function)
if(typeof test!='undefined'&test instanceof Function) test ();}