導航:首頁 > 編程語言 > 左右下角廣告代碼

左右下角廣告代碼

發布時間:2023-06-12 17:20:28

Ⅰ 請問怎麼給右下角js廣告代碼增加關閉按鈕

118/2.gif是一個關閉按鈕圖片嗎?

修改好了,點擊右上角的圖片可關閉廣告。如下:

document.writeln("<styletype="text/css">");
document.writeln("img{border:0px;}");
document.writeln("#haoetv{position:fixed!important;position:absolute;right:0;bottom:0;top:expression");
document.writeln("");
document.writeln("(offsetParent.scrollTop+offsetParent.clientHeight-150);cursor:pointer;}");
document.writeln("#close{position:fixed!important;position:absolute;right:0;bottom:0;top:expression");
document.writeln("");
document.writeln("(offsetParent.scrollTop+offsetParent.clientHeight-149);cursor:pointer;}");
document.writeln("</style>");
document.writeln("");
document.writeln("<divid="haoetv"style="width:328px;height:150px;z-index:99;text-align:right;background:red;");
document.writeln("");
document.writeln("float:right;margin:10px15px-10px0;">");
document.writeln("<divstyle='background:yellow;'><ahref="javascript:void(0)"onclick="document.getElementById('haoetv').style.display='none';"target="_blank"><img");
document.writeln("");
document.writeln("src="118/2.gif"></a></div>");
document.writeln("");
document.writeln("</div>");

有問題可以追問哦。

Ⅱ 如何製作網頁左右兩邊的廣告代碼(可關閉的那種)

用以下代碼即可:
function $(id) {
return document.getElementById(id);
}
function scrollBanner(timer, moveNumber) {
function move(o) {
var st = document.documentElement.scrollTop + o.t;
var sl = document.documentElement.scrollLeft + (o.c == 0 ? o.a : document.documentElement.clientWidth - o.a - o.offsetWidth);
var tc = st - o.offsetTop, lc = sl - o.offsetLeft;
with (o.style) {
top = o.offsetTop + (tc != 0 ? tc / Math.abs(tc) : 0) * Math.min(Math.abs(tc), moveNumber) + "px";
left = o.offsetLeft + (lc != 0 ? lc / Math.abs(lc) : 0) * Math.min(Math.abs(lc), moveNumber) + "px";
}
if (o.person) {
with (o.person.style) {
top = o.offsetTop + "px";
left = o.offsetLeft + o.offsetWidth - o.person.offsetWidth + "px";
}
}
}
var hidden = function() {
var o = this.parent;
window.clearInterval(o.interval);
o.parentNode.removeChild(o);
this.parentNode.removeChild(this);
}
this.add = function (to, t, a, c, lo) {
/*
to為object對象
t為距離頂端距離
當c = 0的時候,a為距離左邊的距離
當c != 0的時候,a為距離右邊的距離
lo為關閉按鈕
*/
var div, exec = function () {
move(to);
};
to.person = lo;
to.t = t;
to.a = a;
to.c = c;
with (to.style) {
position = "absolute";
display = "block";
top = document.documentElement.scrollTop + t;
left = document.documentElement.scrollLeft + (c == 0 ? a : document.documentElement.clientWidth - a - to.offsetWidth);
}
if ("undefined" != typeof lo) {
with (lo.style) {
position = "absolute";
display = "block";
}
lo.onmousedown = hidden;
lo.parent = to;
}
exec();
to.interval = window.setInterval(exec, timer);
};
}
window.onload = function () {
var b = new scrollBanner(10,15);
b.add($("lwc"), 80, 10, 0, $("lwc_c"));
b.add($("rwc"), 80, 10, 1, $("rwc_c"));
b = null;
}

Ⅲ 如何在網頁中插入廣告代碼。

1、首先通過網路搜索網路地圖生成器,進入網路地圖生成器的創建地圖頁面。

Ⅳ 求一個右下角的漂浮廣告代碼

右下角漂浮廣告代碼使用方法(一): 將以下代碼以**.js文件形式保存,在模板中調用這個js文件即可
(備注該代碼的圖片大小為250*150 代碼裡面有參數自己看下就知道了)document.writeln("<div id=\"qqaddiv\" style=\"position:absolute; z-index: 100;\"> ");
document.writeln("<a href=鏈接地址 target=_blank><img src=圖片鏈接地址 border=0></a>");
document.writeln("</div>");
var bodyfrm = ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body;
var adst = document.getElementById("qqaddiv").style;
adst.top = ( bodyfrm.clientHeight - 150 ) + "px";
adst.left = ( bodyfrm.clientWidth - 250 ) + "px";
function moveR() {
adst.top = ( bodyfrm.scrollTop + bodyfrm.clientHeight - 150 ) + "px";
adst.left = ( bodyfrm.scrollLeft + bodyfrm.clientWidth - 250 ) + "px";
}
setInterval("moveR();", 80); 右下角漂浮廣告代碼使用方法(二): var qq_etewidth = 259;
var qq_eteheight = 158;
var qq_banner_filename = "廣告圖片鏈接地址";
var qq_gotoUrl = '廣告鏈接地址';document.write("<div id=eteUnionUpFloat style='margin:0px;padding-bottom:300px;z-index: 10;position:absolute;width:"+qq_etewidth+"px;height:"+qq_eteheight+"px;'>")

document.write("<a href='"+qq_gotoUrl+"' target='_blank'><img src='"+qq_banner_filename+"' border='0' style='cursor: hand;' width='"+qq_etewidth+"' height='"+qq_eteheight+"'></a>")
document.write("</div>")
var bodyfrm = ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body;
var adst = document.getElementById("eteUnionUpFloat").style;
adst.top = ( bodyfrm.clientHeight - qq_eteheight ) + "px";
adst.left = ( bodyfrm.clientWidth - qq_etewidth ) + "px";
function moveR() {
adst.top = ( bodyfrm.scrollTop + bodyfrm.clientHeight - qq_eteheight ) + "px";
adst.left = ( bodyfrm.scrollLeft + bodyfrm.clientWidth - qq_etewidth ) + "px";
}
var objTimer=setInterval("moveR();", 100);function CloseX(){
adst.display='none';
}function ete_closediv()
{
document.getElementById('eteUnionUpFloat').style.visibility='hidden';
if(objTimer) window.clearInterval(objTimer)
}

Ⅳ 求網頁代碼:從屏幕下方彈出QQ廣告的代碼

<!--把下列代碼加到head區域內-->
<head>
<SCRIPT language=javascript>
//more javascript from http://www.jcgo.cn
window.onload = enetgetMsg;
window.onresize = enetresizeDiv;
window.onerror = function(){}
var enetdivTop,enetdivLeft,enetdivWidth,enetdivHeight,enetdocHeight,enetdocWidth,enetobjTimer,i = 0;
function enetgetMsg()
{
try{
enetdivTop = parseInt(document.getElementById("enetMeng").style.top,10)
enetdivLeft = parseInt(document.getElementById("enetMeng").style.left,10)
enetdivHeight = parseInt(document.getElementById("enetMeng").offsetHeight,10)
enetdivWidth = parseInt(document.getElementById("enetMeng").offsetWidth,10)
enetdocWidth = document.body.clientWidth;
enetdocHeight = document.body.clientHeight;
document.getElementById("enetMeng").style.top = parseInt(document.body.scrollTop,10) + enetdocHeight + 10;// enetdivHeight
document.getElementById("enetMeng").style.left = parseInt(document.body.scrollLeft,10) + enetdocWidth - enetdivWidth
document.getElementById("enetMeng").style.visibility="visible"
enetobjTimer = window.setInterval("enetmoveDiv()",10)
}
catch(e){}
}

function enetresizeDiv()
{
i+=1
if(i>600) enetcloseDiv()
try{
enetdivHeight = parseInt(document.getElementById("enetMeng").offsetHeight,10)
enetdivWidth = parseInt(document.getElementById("enetMeng").offsetWidth,10)
enetdocWidth = document.body.clientWidth;
enetdocHeight = document.body.clientHeight;
document.getElementById("enetMeng").style.top = enetdocHeight - enetdivHeight + parseInt(document.body.scrollTop,10)
document.getElementById("enetMeng").style.left = enetdocWidth - enetdivWidth + parseInt(document.body.scrollLeft,10)
}
catch(e){}
}
function enetmoveDiv()
{
try
{
if(parseInt(document.getElementById("enetMeng").style.top,10) <= (enetdocHeight - enetdivHeight + parseInt(document.body.scrollTop,10)))
{
window.clearInterval(enetobjTimer)
enetobjTimer = window.setInterval("enetresizeDiv()",1)
}
enetdivTop = parseInt(document.getElementById("enetMeng").style.top,10)
document.getElementById("enetMeng").style.top = enetdivTop - 1
}
catch(e){}
}
function enetcloseDiv()
{
document.getElementById('enetMeng').style.visibility='hidden';
if(enetobjTimer) window.clearInterval(enetobjTimer)
}
</SCRIPT>
<!--把下列代碼加到BODY區域內-->
<DIV id=enetMeng
style="BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX: 99999; LEFT: 0px; VISIBILITY: visible; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: 241px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: -200px; HEIGHT: 157px">
<TABLE WIDTH=255 BORDER=0 CELLPADDING=0 CELLSPACING=0 bgcolor="#DAE6FC">
<TR>

<TD height="30" valign="top" >
<table width="255" height="19" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="212" valign="bottom"><strong><font size="2"> <font color="#FF6600">消息框</font></font></strong></td>
<td width="43" style="cursor:hand" onClick="enetcloseDiv()">X</td>
</tr>
</table> </TD>
</TR>
<TR>
<TD height="122" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="95%"><table align="center" width="98%"><tr><td>
歡迎你來到學習愛好者http://www.jcgo.cn</td><tr></table></td>
</tr>
</table> </TD>
</TR>
<TR>
<TD></TD>
</TR>
</TABLE></div>

閱讀全文

與左右下角廣告代碼相關的資料

熱點內容
網路如何贊美女人漂亮 瀏覽:143
如何把桌面文件放到excel裡面 瀏覽:363
照片文件名是怎麼查的 瀏覽:876
c怎麼在cmd模式下顯示文件 瀏覽:325
手機怎麼把文件夾的圖片移到相冊 瀏覽:440
hjc是啥文件的格式 瀏覽:298
報廢鐵皮文件櫃圖片 瀏覽:801
win10系統更新文件能 瀏覽:558
怎麼讓蘋果手機下載其他APP 瀏覽:471
多個cs文件編譯成一個dll 瀏覽:606
sql管理工具70 瀏覽:130
js裡面的圖片對齊 瀏覽:965
三星2016視頻文件夾 瀏覽:317
舊手機創新手機數據怎麼傳 瀏覽:954
怎麼刪除領克app里的記錄 瀏覽:254
捷波朗弦月3最新版本 瀏覽:123
win10保存不了文件 瀏覽:735
jsonobject解析list 瀏覽:558
網站未知回應怎麼回事 瀏覽:103
refdoc資料庫 瀏覽:602

友情鏈接