用node写了个接口,但是启动前端的时候一直请求不到数据,报错 Failed to load http://localhost:3000/products: The ‘Access-Control-Allow-Origin’ header has a value ‘http://127.0.0.1:3000’ that is not equal to the supplied origin. 后来在n…
判断是否为undefined
var example undefined;
if (typeof(example) "undefined")
{console.log("undefined")
}判断是否为null
var example null;
if (!example && typeof(example)!undefined && example!0)
{console.log("nu…