/** * window.location.hostname 不带端口号 * window.location.host 带 */ 转载于:https://www.cnblogs.com/lxh520/p/8441122.html