JS cross-domain synchronization cookie How to achieve
Document.cookie = "Name=" + "value" + "expires=" + "datatime" + "domain=" + "" + "path=" + "/path" + "; Secure ";
Name Cookie Names
Value Cookie Values
Expires valid until (in milliseconds)
Path subdirectory
Domain valid field
Secure is safe
<iframe src= ' http://website: 1234/test/index ' width= ' height= ' style= ' Display:none ' ></iframe>
The original page js window.location = "http://another website: 1234/getcookie/index?" + Document.cookie;
Jump to another station,
Another station gets the cookie, sets the cookie
var url = window.location.toString ()//Get Address
var get = url.substring (Url.indexof ("Liuph"))//getting variable and variable values
var idx = get.indexof ("=");//Get Variable name length
if (idx!=-1) {
var name = get.substring (0, IDX);//Get variable name
var val = get.substring (idx + 1);//Get variable Value
Setcookie (Name, Val, 1);//Create Cookie
}