电脑故障

位置:IT落伍者 >> 电脑故障 >> 浏览文章

利用脚本做的图片来回滑动


发布日期:2022/8/22
 

前台代码

<div id=soutu>

<div id=zhuan>这里只是放一张图片而已

<img alt= src=/Images/ajpg width= height= />

</div>

</div>

<div id=tuzi>这里调用脚本函数

<a # onmousemove=showLink() class=aTaohang></a>

<a # onmousemove=showLink()class=aTaohang></a>

<a # onmousemove=showLink() class=aTaohang></a>

<a # onmousemove=showLink() class=aTaohang></a>

</div>

脚本这里可我做成一个JS文件放在前台调用这样就方便点

var time = windowsetInterval(luen() );

function showLink(num) {

windowclearTimeout(time);

if (num == ) {

documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height= /></div>

}

if (num == ) {

documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div>

}

if (num == ) {

documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div>

}

if (num == ) {

documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div>

}

}

function out() {

time = windowsetInterval(luen() );

}

var tmp = ;

function luen() {

tmp++;

if (tmp == ) {

documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div>

}

else if (tmp == ) {

documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div>

}

else if (tmp == ) {

documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div>

}

else if (tmp == ) {

documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div>

}

else {

tmp = ;

}

}

function showbuy(divId) {

documentgetElementById(divId)styledisplay = block;

}

function disbuy(divId){

documentgetElementById(divId)styledisplay = none;

}

样式

aTaohang

{

display: block;

float: left;

fontsize: px;

fontweight: ;

color: White;

backgroundcolor: Gray;

width: px;

height: px;

textalign: center;

margin: px;

textdecoration: none;

}

aTaohang:hover

{

color: Gray;

backgroundcolor: White;

}

上一篇:在VC下显示JPEG、GIF格式图像的一种简便方法

下一篇:老生常谈:解释器模式