JavaScript 判断属性是否存在

if(typeof (jsonObject.name) == "undefined"){
    alter("该属性不存在!");
}
posted @ 2020-04-03 11:41  唯爱金生  阅读(476)  评论(0编辑  收藏  举报