去除对象中的null值属性
function removeNull(option) { if (!option) { return; } for (var attr in option) { if (option[attr] === null && attr !== 'teacherId') { delete option[attr]; continue; } if (typeof (option[attr]) == "object") { removeNull(option[attr]); } } }