Home >Web Front-end >JS Tutorial >How to implement Cooike that the page can only be opened once_javascript skills
Recently I am working on webIM and embedding it into the OA system. Since WEBIM is on a separate page, multiple pages will appear if clicked multiple times. In this way, under IE6, the server push will not recognize the page. So there are The following code:
Just put the above code under the head. Haha, is it simple enough? Of course, the above code is mainly The solution is for pages opened with hyperlinks. If it is a page opened by window.open, it is even simpler. The code is as follows:
var win = null;//Just define a variable to judge
if (win == null)
{
win =window.open("Main.aspx", '', strfeatures);
}