我正在研究將爲第一次使用ColorBox的訪問者發送消息的代碼。我一直在引導代碼,這是我迄今爲止... ...顯示器Colorbox Onload頁面加載
<html>
<head>
<script type="text/javascript">
<script src="../colorbox/jquery.colorbox.js"></script>
<script type="text/javascript" src="scripts/jquery.cookies.2.2.0.min.js"></script>
<script>
function loadMsg()
{
$(document).ready(function(){
if ($.cookie('newsletter') != '0') {
$.colorbox({href:"newsletter.html"});
$.cookie('newsletter', '1', { expires: 60}); }
}}
</script>
</head>
<body onload="loadMsg()">
<h1>Hello World!</h1>
</body>
</html>
這會保持彈出窗口再次顯示。你能幫我弄清楚我錯過了什麼嗎?