简体   繁体   English

IE jQuery Cookie问题

[英]IE jQuery cookie issue

Why my cookie law script appears every time when i open my website ONLY on Internet Explorer or Microsoft Edge? 为什么当我仅在Internet Explorer或Microsoft Edge上打开网站时,每次都会出现cookie法律脚本?

if I close the browser and reopen it, the cookie will be asked. 如果我关闭浏览器并重新打开它,将询问cookie。 Again and again on my web site. 一次又一次地在我的网站上。

this is my site: http://www.nepsrl.it/ 这是我的网站: http : //www.nepsrl.it/

this is my script: http://www.nepsrl.it/cookieinfo/cookieinfo/cookieinfo.js 这是我的脚本: http : //www.nepsrl.it/cookieinfo/cookieinfo/cookieinfo.js

I tried to fix the problem several times, but without success, I think it is a compatibility problem, someone has an idea? 我多次尝试解决该问题,但是没有成功,我认为这是一个兼容性问题,有人有想法吗?

This is already embedded in your script file. 这已经嵌入在您的脚本文件中。

Code for building the cookie banner html 用于构建Cookie横幅html的代码

var cookieInfoMain = '<div id="cookie-law-container-box"><div id="cookie-law-container"><div id="cookie-law-message">' + this.options.defaultText + '</div><div id="cookie-law-action" style="float:right;"><a class="cookie-law-button" id="cookie-law-button-ok" href="#">' + this.options.okButton + '</a>' + moreButton + '</div><div style="clear:both;"></div></div></div>';

Code where it is appended to the body 附加到正文的代码

$("body").append('<div id="jquery-cookie-law-script" class="' + this.options.style +' ' + this.options.location + ' ' + position + '">'+ cookieInfoMore + cookieInfoMain + '</div>');

If you don't want the cookie information to be shown, then remove that code from appending to body. 如果您不希望显示Cookie信息,那么请将该代码从附加到正文中删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM