js创建cookie时获取一级域名设置domain解决跨域问题
解决子域和主域的cookie问题:function GetCookieDomain() { var host = location.hostname; var ip = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}...