当前位置:编程学习 > JS >>

js控制图片翻转

<html>
<head>
<title>js控制图片翻转</title>
<script language="网页特效">
<!-- this script works in: navigator 3 - 4, opera 3.1, and explorer 4

if (document.images) {
teston = new image(); // active images
teston.src = "test.on.gif";

testoff = new image(); // inactive images
testoff.src = "test.off.gif";
}

function imgon(imgname) {

if (document.images) {
document[imgname].src = eval(imgname + "on.src");
}
}

function imgoff(imgname) {
if (document.images) {
document[imgname].src = eval(imgname + "off.src");
}
}

// -->
</script>

</head>
<body>

<p><a href="testcss教程.html" onmouseo教程ver="imgon('test')" onmouseout="imgoff('test')"><img src="test.off.gif" width="100" height="100" border="0" name="test"></a>

补充:网页制作,js教程 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,