尝试这样的事情:
if (typeof me.onChange !== "undefined") { // safe to use the function}或更好(根据UpTheCreek推荐的评论)
if (typeof me.onChange === "function") { // safe to use the function}
尝试这样的事情:
if (typeof me.onChange !== "undefined") { // safe to use the function}或更好(根据UpTheCreek推荐的评论)
if (typeof me.onChange === "function") { // safe to use the function}