重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
dz的对联盟广告代码是在后台设置的
成都创新互联电话联系:13518219792,为您提供成都网站建设网页设计及定制高端网站建设服务,成都创新互联网页制作领域十多年,包括塑料袋等多个领域拥有丰富的网站设计经验,选择成都创新互联,为企业保驾护航。
不需要单独设置对联代码的啊
如下图,之前点进去设置即可
建议你试用歌遨游浏览器,他可以帮你解决此类问题!傲游 [Maxthon] 浏览器 是一款基于 IE 内核的、多功能、个性化多页面浏览器. 它允许在同一窗口内打开任意多个页面, 减少浏览器对系统资源的占用率, 提高网上冲浪的效率. 同时它又能有效防止恶意插件, 阻止各种弹出式, 浮动式广告,加强网上浏览的安全. Maxthon 支持各种外挂工具及 IE 插件, 使你在 Maxthon 中可以充分利用所有的网上资源, 享受上网冲浪的乐趣.
下载地址
JS是 Java Script 的简写,是用JAVA脚本写的代码。
比如说在做网站的时候,插入一段JS代码就可以调用并JS代码里面的内容,就不用一定把这些代码写在网页文件里。
单纯只是这样看,那是应为该DIV层被隐藏了。
应该有个事件是会触发层显示的,也就是将div中visibility的属性变成visible的。
如果你要测试。直接将visibility:hidden;换成visibility:visible;
1.滚动的阿里妈妈广告:
A.用脚本语言实现: marquee id="scrollarea" direction="up" scrolldelay="100" scrollamount="2" width="150" height="130" onmouseover="this.stop();" onmouseout="this.start();"
:这个地方放你的阿里妈妈的代码:
/marquee/
可以设置滚动的方向,速度等,各种参数如下:
marquee 参数:
BGColor:滚动文本框的背景颜色。
Direction:滚动方向设置,可选择Left、Right、up和down。
scrolldelay:每轮滚动之间的延迟时间,越大越慢。
scrollamount:一次滚动总的时间量,数字越小滚动越慢。
Behaviour:滚动的方式设置,三种取值:Scroll(循环滚动) lide(单次滚动)、Alternate(来回滚动)。
Align:文字的对齐方式设置。可选择Middle(居中)、Bottom(居下)还是Top(居上)。
Width:滚动文本框的宽度,输入一个数值后从后面的单选框选择in Pixels(按像素)或是in Percent(按百分比)。
Height:滚动文本框的高度,输入一个数值后从后面的单选框选择in Pixels(按像素)或是in Percent(按百分比)。
loop:滚动次数。默认为infinite
hspace、vspace:前后、上下的空行。
2.让阿里妈妈广告任意漂浮
div id="ad" style="position:absolute"
[color=Red]a href="" target="_blank"
img src="" border="0"
注意:从a herf --------------------这里根据你自己的情况设置阿里妈妈的广告,可以增加一个table,支持所有的html语言。
/a/div
script
var x = 50,y = 60
var xin = true, yin = true
var step = 1
var delay = 10
var obj=document.getElementById("ad")
function floatAD() {
var L=T=0
var R= document.body.clientWidth-obj.offsetWidth
var B = document.body.clientHeight-obj.offsetHeight
obj.style.left = x + document.body.scrollLeft
obj.style.top = y + document.body.scrollTop
x = x + step*(xin?1:-1)
if (x L) { xin = true; x = L}
if (x R){ xin = false; x = R}
y = y + step*(yin?1:-1)
if (y T) { yin = true; y = T }
if (y B) { yin = false; y = B }
}
var itl= setInterval("floatAD()", delay)
obj.onmouseover=function(){clearInterval(itl)}
obj.onmouseout=function(){itl=setInterval("floatAD()", delay)}
/script [/color]
大伙根据自己的喜好进行修改,其中的X,Y是起始的坐标,增加速度是1,你也可以随便修改。学习一些脚本还是有好处的。
3.让阿里妈妈成对联。
要求分辨率为1024*768。代码如下:
var delta=0.015
var collection;
function floaters() {
this.items = [];
this.addItem = function(id,x,y,content)
{
document.write('DIV id='+id+' style="Z-INDEX: 0; POSITION: absolute; width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'"'+content+'/DIV');
var newItem = {};
newItem.object = document.getElementById(id);
newItem.x = x;
newItem.y = y;
this.items[this.items.length] = newItem;
}
this.play = function()
{
collection = this.items
setInterval('play()',10);
}
}
function play()
{
if(screen.width=800)
{
for(var i=0;icollection.length;i++)
{
collection[i].object.style.display = 'none';
}
return;
}
for(var i=0;icollection.length;i++)
{
var followObj = collection[i].object;
var followObj_x = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
var followObj_y = (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);
if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
dx=(dx0?1:-1)*Math.ceil(Math.abs(dx));
followObj.style.left=followObj.offsetLeft+dx;
}
if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
dy=(dy0?1:-1)*Math.ceil(Math.abs(dy));
followObj.style.top=followObj.offsetTop+dy;
}
followObj.style.display = '';
}
}
var theFloaters = new floaters();
theFloaters.addItem('followDiv1','document.body.clientWidth-100',0,'/abr
[color=Red]a href=广告链接地址 target=_blankimg src=广告图片地址 width=100 height=400 border=0/a
这里放第一个广告代码····同2,可以增加table···
');
theFloaters.addItem('followDiv2',0,0,'br
a href=广告链接地址 target=_blankimg src=广告图片地址 width=100 height=400 border=0/a
放第二个广告代码···同上···
');
theFloaters.play(); [/color]
4.可以被拖动的阿里妈妈广告。代码比较复杂,太长了,
html
head
title_xWin/title
style type='text/css'
!--
a:visited{text-decoration:none;color:slategray;}
a:hover{text-decoration:underline;color:slategray;}
a:link{text-decoration:none;color:slategray;}
--
/style
script language=JScript
!--
//可以打包为js文件;
var x0=0,y0=0,x1=0,y1=0;
var offx=6,offy=6;
var moveable=false;
var hover='orange',normal='slategray';//color;
var index=10000;//z-index;
//开始拖动;
function startDrag(obj)
{
//锁定标题栏;
obj.setCapture();
//定义对象;
var win = obj.parentNode;
var sha = win.nextSibling;
//记录鼠标和层位置;
x0 = event.clientX;
y0 = event.clientY;
x1 = parseInt(win.style.left);
y1 = parseInt(win.style.top);
//记录颜色;
normal = obj.style.backgroundColor;
//改变风格;
obj.style.backgroundColor = hover;
win.style.borderColor = hover;
obj.nextSibling.style.color = hover;
sha.style.left = x1 + offx;
sha.style.top = y1 + offy;
moveable = true;
}
//拖动;
function drag(obj)
{
var win = obj.parentNode;
var sha = win.nextSibling;
if(moveable)
{
win.style.left = x1 + event.clientX - x0;
win.style.top = y1 + event.clientY - y0;
sha.style.left = parseInt(win.style.left) + offx;
sha.style.top = parseInt(win.style.top) + offy;
}
}
//停止拖动;
function stopDrag(obj)
{
var win = obj.parentNode;
var sha = win.nextSibling;
win.style.borderColor = normal;
obj.style.backgroundColor = normal;
obj.nextSibling.style.color = normal;
sha.style.left = obj.parentNode.style.left;
sha.style.top = obj.parentNode.style.top;
//放开标题栏;
obj.releaseCapture();
moveable = false;
}
//获得焦点;
function getFocus(obj)
{
index = index + 2;
var idx = index;
obj.style.zIndex=idx;
obj.nextSibling.style.zIndex=idx-1;
}
function min(obj)
{
var win = obj.parentNode.parentNode;
var sha = win.nextSibling;
var tit = obj.parentNode;
var msg = tit.nextSibling;
var flg = msg.style.display=="none";
if(flg)
{
win.style.height = parseInt(msg.style.height) + parseInt(tit.style.height) + 2*2;
sha.style.height = win.style.height;
msg.style.display = "block";
obj.innerHTML = "0";
}
else
{
win.style.height = parseInt(tit.style.height) + 2*2;
sha.style.height = win.style.height;
obj.innerHTML = "2";
msg.style.display = "none";
}
}
function cls(obj)
{
var win = obj.parentNode.parentNode;
var sha = win.nextSibling;
win.style.visibility = "hidden";
sha.style.visibility = "hidden";
}
//创建一个对象;
function xWin(id,w,h,l,t,tit,msg)
{
index = index+2;
this.id = id;
this.width = w;
this.height = h;
this.left = l;
this.top = t;
this.zIndex = index;
this.title = tit;
this.message = msg;
this.obj = null;
this.bulid = bulid;
this.bulid();
}
//初始化;
function bulid()
{
var str = ""
+ "div id=xMsg" + this.id + " "
+ "style='"
+ "z-index:" + this.zIndex + ";"
+ "width:" + this.width + ";"
+ "height:" + this.height + ";"
+ "left:" + this.left + ";"
+ "top:" + this.top + ";"
+ "background-color:" + normal + ";"
+ "color:" + normal + ";"
+ "font-size:10px;"
+ "font-family:Verdana;"
+ "position:absolute;"
+ "cursor:default;"
+ "border:2px solid " + normal + ";"
+ "' "
+ "onmousedown='getFocus(this)'"
+ "div "
+ "style='"
+ "background-color:" + normal + ";"
+ "width:" + (this.width-2*2) + ";"
+ "height:20;"
+ "color:white;"
+ "' "
+ "onmousedown='startDrag(this)' "
+ "onmouseup='stopDrag(this)' "
+ "onmousemove='drag(this)' "
+ ""
+ "span style='width:" + (this.width-2*12-4) + ";padding-left:3px;'" + this.title + "/span"
+ "span style='width:12;border-width:0px;color:white;font-family:webdings;' onclick='min(this)'0/span"
+ "span style='width:12;border-width:0px;color:white;font-family:webdings;' onclick='cls(this)'r/span"
+ "/div"
+ "div style='"
+ "width:100%;"
+ "height:" + (this.height-20-4) + ";"
+ "background-color:white;"
+ "line-height:14px;"
+ "word-break:break-all;"
+ "padding:3px;"
+ "'" + this.message + "/div"
+ "/div"
+ "div style='"
+ "width:" + this.width + ";"
+ "height:" + this.height + ";"
+ "top:" + this.top + ";"
+ "left:" + this.left + ";"
+ "z-index:" + (this.zIndex-1) + ";"
+ "position:absolute;"
+ "background-color:black;"
+ "filter:alpha(opacity=40);"
+ "'?/div";
//alert(str);
document.body.insertAdjacentHTML("beforeEnd",str);
}
//--
/script
script language='JScript'
!--
function initialize()
{
var a = new xWin("1",160,200,200,200,"Message","xWin br A Cool Pop Div WindowbrVersion:1.0br2002-8-13");
var b = new xWin("2",240,200,100,100,"Wildwind's Msgbox","Welcome to visited my personal website:br
[color=Red]这个地方放广告代码·························
brand u can also sign my guestbook at:br
这个地方放广告代码····················
brbrthx!!! =)...");
var c = new xWin("3",200,160,250,50,"Copyright","Copyright by a href='mailto:wildwind_zz@21cn.com'Wildwind/a!");
}
window.onload = initialize;
//--
/script
/head
body onselectstart='return false' oncontextmenu='return false'
/body
/html[/color]
这么复杂的东东
只需要一个Java Script的代码就可以,但是广告你还是要用图画进行设计的。