let accountIdList= [];
let accountObject= {};
if (JSON.stringify(accountIdList) == '[]') {
MsgInfo("ID为必填"); //提示信息
return;
}
if (JSON.stringify(accountObject) == '{}') {
MsgInfo("必填");//提示信息
return;
}
JS中判断对象和数组为空
最新推荐文章于 2024-07-03 00:30:00 发布