Define a variable var params=null in js; a method to determine that params are not empty: The code copy is as follows: if(params && params.hasOwnProperty("name")){} Where: console.info(params);//The result is: Object {}