标题:[求助]如何修改变换背景图片的位置
只看楼主
龙云翔
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-7-4
 问题点数:0 回复次数:0 
[求助]如何修改变换背景图片的位置

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 2</title>
<SCRIPT LANGUAGE="JavaScript">
if (navigator.appName == "Microsoft Internet Explorer") {;
pic1 = new Image(); pic1.src ="images/css-cyou-02.jpg";
pic2 = new Image(); pic2.src ="images/susuki_1.jpg";
pic3 = new Image(); pic3.src ="images/css-kagi-001.gif";
pic4 = new Image(); pic4.src ="images/css-cyou-rp.jpg";
}
function imagechange(imgName) {
if (navigator.appName == "Microsoft Internet Explorer") {
document.body.background = eval(imgName + ".src");
}
}

</script>
</head>

<body>
&nbsp;&nbsp;&nbsp;

<p> </p>
<table border="0" width="1%">
<tr>
<td>
<a href="#" onMouseDown="imagechange('pic1');" onMouseOut="imagechange('clear');"><img src="images/3.gif" border="0"></a></td>
</tr>
<tr>
<td>
<a href="#" onMouseDown="imagechange('pic2');" onMouseOut="imagechange('clear');"><img src="images/4.gif" border="0"></a></td>
</tr>
<tr>
<td>
<a href="#" onMouseDown="imagechange('pic3');" onMouseOut="imagechange('clear');"><img src="images/5.gif" border="0"></a></td>
</tr>
<tr>
<td>
<a href="#" onMouseDown="imagechange('pic4');" onMouseOut="imagechange('clear');"><img src="images/6.gif" border="0"></a></td>
</tr>
</table>

</body>

</html>

就是这段代码了!这是段用按钮来变换背景图片的代码!我希望能让背景图片固定在左下角!应该怎么修改哦!谢谢!请会的人帮下忙!鞠躬!

[此贴子已经被作者于2006-7-5 23:21:48编辑过]

搜索更多相关主题的帖子: Microsoft function Internet Explorer content 
2006-07-05 23:20



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-76799-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022804 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved