1. myObj.hasOwnProperty('myKey'); 2. if ('key' in myObj) 转载于:https://www.cnblogs.com/spring87/p/6768336.html