请问怎样在网站两边加FLASH广告,随滚动条而动 rt, xiexie 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <SCRIPT LANGUAGE="JavaScript"><!--var showad = true;var Toppx = 80; //上端位置var AdDivW = 100; //宽度var AdDivH = 400; //高度var PageWidth = 800; //页面多少宽度象素下正好不出现左右滚动条var MinScreenW = 800; //显示广告的最小屏幕宽度象素var ClosebuttonHtml = '<div align="right" style="position: absolute;top:0px;right:0px;margin:2px;padding:2px;z-index:2000;"><a href="javascript:;" onclick="hidead()" style="color:red;text-decoration:none;font-size:12px;">关闭</a></div>'var AdContentHtml = '<div align="center" style="color:green;font-size:23pt;font-family:黑体;"><a href="http://asiafind.com/go/g791252-pmem.subinfor+reg?lang=gb"><img src="../sd.jpg"></a></div>';document.write ('<div id="Javascript.LeftDiv" style="position: absolute;border: 1px solid #336699;background-color:#EEEEE2;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;">'+ClosebuttonHtml+'<div>'+AdContentHtml+'</div></div>');document.write ('<div id="Javascript.RightDiv" style="position: absolute;border: 1px solid #336699;background-color:#EEEEE2;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;">'+ClosebuttonHtml+'<div>'+AdContentHtml+'</div></div>');function scall(){ if(!showad){return;} if (window.screen.width<MinScreenW){ alert("临时提示:\n\n显示器分辨率宽度小于"+MinScreenW+",不显示广告"); showad = false; document.getElementById("Javascript.LeftDiv").style.display="none"; document.getElementById("Javascript.RightDiv").style.display="none"; return; } var Borderpx = ((window.screen.width-PageWidth)/2-AdDivW)/2; document.getElementById("Javascript.LeftDiv").style.display=""; document.getElementById("Javascript.LeftDiv").style.top=document.body.scrollTop+Toppx; document.getElementById("Javascript.LeftDiv").style.left=document.body.scrollLeft+Borderpx; document.getElementById("Javascript.RightDiv").style.display=""; document.getElementById("Javascript.RightDiv").style.top=document.body.scrollTop+Toppx; document.getElementById("Javascript.RightDiv").style.left=document.body.scrollLeft+document.body.clientWidth-document.getElementById("Javascript.RightDiv").offsetWidth-Borderpx;}function hidead(){ showad = false; document.getElementById("Javascript.LeftDiv").style.display="none"; document.getElementById("Javascript.RightDiv").style.display="none";}window.onscroll=scall;window.onresize=scall;window.onload=scall;//--></SCRIPT> glacier111(冰河) 你给我的是图片,我现在想把它换成FALSH的图片的我已经搞好了 js+divDiv里面随便放图片还是flash都可以http://www.hn-hs.net 效果图,把他的源码搞出来就行了 晕,你把图片部分换成flash不就可以了? 换成不可以啊我发段代码:<script>self.onError = null;currentX = currentY = 0; whichIt = null; lastScrollX = 0; lastScrollY = 0;NS = (document.layers) ? 1 : 0;IE = (document.all) ? 1: 0;<!-- STALKER CODE -->function heartBeat(objectid) { if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; } if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } if(diffY != lastScrollY) { percent = .1 * (diffY - lastScrollY); if(percent > 0) percent = Math.ceil(percent); else percent = Math.floor(percent); if(IE) { objectid = objectid.split(";"); for (i = 0; i < objectid.length; i++) eval("document.all."+objectid[i]).style.pixelTop += percent; } if(NS) { objectid = objectid.split(";"); for (i = 0; i < objectid.length; i++) eval("document."+objectid[i]).top += percent; } lastScrollY = lastScrollY + percent; } if(diffX != lastScrollX) { percent = .1 * (diffX - lastScrollX); if(percent > 0) percent = Math.ceil(percent); else percent = Math.floor(percent); if(IE) { objectid = objectid.split(";"); for (i = 0; i < objectid.length; i++) eval("document.all."+objectid[i]).style.pixelLeft += percent; } if(NS) { objectid = objectid.split(";"); for (i = 0; i < objectid.length; i++) eval("document."+objectid[i]).left += percent; } lastScrollX = lastScrollX + percent; } }<!-- /STALKER CODE -->if(NS || IE) action = window.setInterval("heartBeat('floater;floater1;floater2;floater3')", 5);if (IE){ document.write("<DIV id='floater' style='LEFT: 5px; TOP: 310px; POSITION: absolute; WIDTH: 83; VISIBILITY: visible; Z-INDEX: 10;'><a href='../flash/Steehead_DS_Chinese.pdf' target='_blank'><IMG src='../flash/flash.jpg' height='100' width='95' border='0'></a></DIV>") document.write("<DIV id='floater1' style='LEFT: 5px; TOP: 420px; POSITION: absolute; WIDTH: 83; VISIBILITY: visible; Z-INDEX: 10;'><IMG src='images/null.jpg' height='1' width='1' border='0'></DIV>") document.write("<DIV id='floater2' style='right: 5px; TOP: 310px; POSITION: absolute; WIDTH: 83; VISIBILITY: visible; Z-INDEX: 10;'><a href='http://www.zhongph.com' target='_blank'><IMG src='../flash/flash.swf' height='100' width='95' border='0'></a></DIV>") document.write("<DIV id='floater3' style='right: 5px; TOP: 420px; POSITION: absolute; WIDTH: 83; VISIBILITY: visible; Z-INDEX: 10;'><IMG src='images/null.jpg' height='1' width='1' border='0'></DIV>")}if (NS){ document.write("<layer id=myleft top=400 width=80 height=80></layer>");}</script>不是换图片那么简单.. 表的列值排序 正则表达式问题关于逻辑或 有关邮件附件问题 请教:C#中关于串口或USB通讯的控制在什么地方? 关于pictruebox显示慢 自定义控件双缓冲异常(在线急等) WPF的一个问题,求高手赐教 在将 varchar 值 '交易案例' 转换成数据类型 int 时失败。 请帮忙看看这个程序为什么出错? WinFrom中的DataGrid的某一列可以绑定Checkbox吗? 如何用ExecuteNonQuery执行多条SQL语句? 如何返回消息给客户端
<!--
var showad = true;
var Toppx = 80; //上端位置
var AdDivW = 100; //宽度
var AdDivH = 400; //高度
var PageWidth = 800; //页面多少宽度象素下正好不出现左右滚动条
var MinScreenW = 800; //显示广告的最小屏幕宽度象素var ClosebuttonHtml = '<div align="right" style="position: absolute;top:0px;right:0px;margin:2px;padding:2px;z-index:2000;"><a href="javascript:;" onclick="hidead()" style="color:red;text-decoration:none;font-size:12px;">关闭</a></div>'
var AdContentHtml = '<div align="center" style="color:green;font-size:23pt;font-family:黑体;"><a href="http://asiafind.com/go/g791252-pmem.subinfor+reg?lang=gb"><img src="../sd.jpg"></a></div>';
document.write ('<div id="Javascript.LeftDiv" style="position: absolute;border: 1px solid #336699;background-color:#EEEEE2;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;">'+ClosebuttonHtml+'<div>'+AdContentHtml+'</div></div>');
document.write ('<div id="Javascript.RightDiv" style="position: absolute;border: 1px solid #336699;background-color:#EEEEE2;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;">'+ClosebuttonHtml+'<div>'+AdContentHtml+'</div></div>');
function scall(){
if(!showad){return;}
if (window.screen.width<MinScreenW){
alert("临时提示:\n\n显示器分辨率宽度小于"+MinScreenW+",不显示广告");
showad = false;
document.getElementById("Javascript.LeftDiv").style.display="none";
document.getElementById("Javascript.RightDiv").style.display="none";
return;
}
var Borderpx = ((window.screen.width-PageWidth)/2-AdDivW)/2; document.getElementById("Javascript.LeftDiv").style.display="";
document.getElementById("Javascript.LeftDiv").style.top=document.body.scrollTop+Toppx;
document.getElementById("Javascript.LeftDiv").style.left=document.body.scrollLeft+Borderpx;
document.getElementById("Javascript.RightDiv").style.display="";
document.getElementById("Javascript.RightDiv").style.top=document.body.scrollTop+Toppx;
document.getElementById("Javascript.RightDiv").style.left=document.body.scrollLeft+document.body.clientWidth-document.getElementById("Javascript.RightDiv").offsetWidth-Borderpx;
}function hidead()
{
showad = false;
document.getElementById("Javascript.LeftDiv").style.display="none";
document.getElementById("Javascript.RightDiv").style.display="none";
}
window.onscroll=scall;
window.onresize=scall;
window.onload=scall;
//-->
</SCRIPT>
你给我的是图片,我现在想把它换成FALSH的
图片的我已经搞好了
Div里面随便放图片还是flash都可以
http://www.hn-hs.net 效果图,把他的源码搞出来就行了
我发段代码:
<script>
self.onError = null;
currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; lastScrollY = 0;
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;
<!-- STALKER CODE -->
function heartBeat(objectid) {
if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }
if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
if(diffY != lastScrollY) {
percent = .1 * (diffY - lastScrollY);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document.all."+objectid[i]).style.pixelTop += percent;
}
if(NS) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document."+objectid[i]).top += percent;
}
lastScrollY = lastScrollY + percent;
}
if(diffX != lastScrollX) {
percent = .1 * (diffX - lastScrollX);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document.all."+objectid[i]).style.pixelLeft += percent;
}
if(NS) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document."+objectid[i]).left += percent;
}
lastScrollX = lastScrollX + percent;
}
}
<!-- /STALKER CODE -->
if(NS || IE) action = window.setInterval("heartBeat('floater;floater1;floater2;floater3')", 5);
if (IE){
document.write("<DIV id='floater' style='LEFT: 5px; TOP: 310px; POSITION: absolute; WIDTH: 83; VISIBILITY: visible; Z-INDEX: 10;'><a href='../flash/Steehead_DS_Chinese.pdf' target='_blank'><IMG src='../flash/flash.jpg' height='100' width='95' border='0'></a></DIV>")
document.write("<DIV id='floater1' style='LEFT: 5px; TOP: 420px; POSITION: absolute; WIDTH: 83; VISIBILITY: visible; Z-INDEX: 10;'><IMG src='images/null.jpg' height='1' width='1' border='0'></DIV>")
document.write("<DIV id='floater2' style='right: 5px; TOP: 310px; POSITION: absolute; WIDTH: 83; VISIBILITY: visible; Z-INDEX: 10;'><a href='http://www.zhongph.com' target='_blank'><IMG src='../flash/flash.swf' height='100' width='95' border='0'></a></DIV>")
document.write("<DIV id='floater3' style='right: 5px; TOP: 420px; POSITION: absolute; WIDTH: 83; VISIBILITY: visible; Z-INDEX: 10;'><IMG src='images/null.jpg' height='1' width='1' border='0'></DIV>")
}
if (NS){
document.write("<layer id=myleft top=400 width=80 height=80></layer>");
}
</script>
不是换图片那么简单..