修改青促会漂浮在首页的图片的方法
来源:互联网 发布:office淘宝验证码弹出 编辑:程序博客网 时间:2024/05/18 02:28
首先,将图片上传到服务器上,上传附件地址:http://www.yicas.cn/dct/page/66663
94上面的,在dct文件夹下面,修改
第一、在附件页上传图片文件
第二、在layout.jsp文件中的如下代码:
图片链接的代码:
<img border="0" src="http://XX.XX.XX.XX/clb/getCachedDocument.do?docid=2417" style="cursor:pointer;"/>
图片显示与隐藏的代码:
start();//显示
//hide();//隐藏
=============================================================================================
此页面中需要的代码如下:
<div id="float_AD" style="position: absolute; left: 311; top: 815;" onmouseover="clearInterval(interval);" onmouseout="interval = setInterval('changePos()', delay)" align="right">
<img border="0" src="http://xx.xx.xx.xx/clb/getCachedDocument.do?docid=2361" style="cursor:pointer;"/>
<span style="CURSOR:hand;color:red;font-weight:bold" onclick="clearInterval(interval);ad.style.visibility = 'hidden'">X</span>
</div>
<script language=javascript>
var xPos = 20;
var yPos = 20;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
var ad = document.getElementById("float_AD");
function hide() {
var div = document.getElementById("float_AD");
div.style.display = "none";
div.onmouseout = function() {
div.style.visibility = "hidden";
}
}
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
var ad = document.getElementById("float_AD");
Hoffset = ad.offsetHeight;
Woffset = ad.offsetWidth;
ad.style.left = (xPos + document.body.scrollLeft) + "px";
ad.style.top = (yPos + document.body.scrollTop) + "px";
if (yon) {
yPos = yPos + step;
} else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos + step;
} else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
}
}
function start() {
interval = setInterval('changePos()', delay);
}
function stop() {
clearInterval(interval);
}
var url = window.location.href;
if (url == "http://www.yicas.cn/dct/page/1") {
start();
} else {
hide();
}//2012-08-22 lichong
</script>
- 修改青促会漂浮在首页的图片的方法
- 漂浮的图片
- 漂浮的图片
- 在浏览器中漂浮的广告图片,当图片漂浮至浏览器边界时,自动向相反方向继续漂浮
- 类似新浪首页两边漂浮的广告图片,随滚动条上下移动
- 超强无法拦截的网页漂浮图片广告代码,最小化也还在桌面漂浮
- CSS漂浮 让图片飘在页面的外面
- 实现图片漂浮的代码
- 实现首页图片轮播的方法
- 两边漂浮图片的一段JS
- 两边漂浮图片的一段JS
- 解决Flash挡住漂浮图片的问题
- 两边漂浮图片的一段JS
- 点击消失的漂浮广告图片
- 在ECshop首页模板修改增加收藏本站js代码的方法
- 在wordpress首页显示摘要的方法?
- 在wordpress首页显示摘要的方法?
- ecshop 修改首页flash广告图片的宽高
- my vimrc
- python3运行中的一些问题
- 2012年度中国高校十大科技进展揭晓(转载)
- Node.js先睹为快(4)
- Keil C51 vs 标准C [原]
- 修改青促会漂浮在首页的图片的方法
- 学不进去?可以试着这么做……
- &>/dev/null 等价于 >/dev/null 2>&1
- Node.js 入门
- ios多线程的一些总结
- 重装了IIS,结果装完了之后运行aspx网站出现404错误
- 编程珠玑习题第四章第九题的感想
- 慢慢总结一点asp.net比较常用的代码(持续更新,有好的代码可以留言)
- 如何给关键词合理的报价