漂浮层广告代码[层为隐藏,点击广告后层消失][24小时/次]
这段代码为做广告的朋友可以提供大量的收入,而且浏览者也不怎么反感.
点击以后 24小时内再次浏览将不会出现,精确判断使用者.
本代码只为学习之用,请大家使用时注意节制,用多了会被 广告商K的,有什么不明白可以留言
这段代码为做广告的朋友可以提供大量的收入,而且浏览者也不怎么反感.
点击以后 24小时内再次浏览将不会出现,精确判断使用者.
本代码只为学习之用,请大家使用时注意节制,用多了会被 广告商K的,有什么不明白可以留言
var ggdj = function (p_id)
{
this.id = p_id; var newDiv;
this.test = function ()
{
newDiv = document.getElementById(this.id)
if(newDiv == null) {alert("请传入正确的ID!");return ;}
if(getCookie()) return;
newDiv = newDiv.cloneNode(true);
for(var nI = 0; nI<newDiv.childNodes.length; nI++)
if(newDiv.childNodes[nI].nodeName.toLowerCase() == "a")
newDiv.childNodes[nI].style.cursor = "default";
newDiv.id="newDiv"; newDiv.style.filter = "Alpha(opacity=10)";
newDiv.style.position ="absolute";
newDiv.style.cursor ="default";
document.body.appendChild(newDiv);
newDiv.onclick = function (){
writeCookie();
document.body.removeChild(newDiv);
}
document.onmousemove = function () {
newDiv.style.top = event.y - newDiv.clientHeight/2;
newDiv.style.left = event.x - newDiv.clientWidth/2;
}
}
var writeCookie = function()
{
var time = new Date();
time.setTime(time.getTime() + 86400000);
document.cookie = "8KD6SF6679OH6SFEJ7IU9I9E6=96FIY8GHIJIGG; expires="+time.toGMTString();
}
var getCookie = function()
{
if(document.cookie.indexOf("8KD6SF6679OH6SFEJ7IU9I9E6") != -1)
return true;return false;
}
}
/**//*
使用说明:
如下调用就行了,注意new ggdj("这里是你要显示的那个广告DIV的ID")
//--------------------------
<SCRIPT LANGUAGE="JavaScript" type="text/javascript"
src="test.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
new ggdj("adsfas").test();//adsfas 就是要复制DIV的id
//-->
</SCRIPT>
//===========================
*/
{
this.id = p_id; var newDiv;
this.test = function ()
{
newDiv = document.getElementById(this.id)
if(newDiv == null) {alert("请传入正确的ID!");return ;}
if(getCookie()) return;
newDiv = newDiv.cloneNode(true);
for(var nI = 0; nI<newDiv.childNodes.length; nI++)
if(newDiv.childNodes[nI].nodeName.toLowerCase() == "a")
newDiv.childNodes[nI].style.cursor = "default";
newDiv.id="newDiv"; newDiv.style.filter = "Alpha(opacity=10)";
newDiv.style.position ="absolute";
newDiv.style.cursor ="default";
document.body.appendChild(newDiv);
newDiv.onclick = function (){
writeCookie();
document.body.removeChild(newDiv);
}
document.onmousemove = function () {
newDiv.style.top = event.y - newDiv.clientHeight/2;
newDiv.style.left = event.x - newDiv.clientWidth/2;
}
}
var writeCookie = function()
{
var time = new Date();
time.setTime(time.getTime() + 86400000);
document.cookie = "8KD6SF6679OH6SFEJ7IU9I9E6=96FIY8GHIJIGG; expires="+time.toGMTString();
}
var getCookie = function()
{
if(document.cookie.indexOf("8KD6SF6679OH6SFEJ7IU9I9E6") != -1)
return true;return false;
}
}
/**//*
使用说明:
如下调用就行了,注意new ggdj("这里是你要显示的那个广告DIV的ID")
//--------------------------
<SCRIPT LANGUAGE="JavaScript" type="text/javascript"
src="test.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
new ggdj("adsfas").test();//adsfas 就是要复制DIV的id
//-->
</SCRIPT>
//===========================
*/