怎么将一张图片设为背景,点击后进入另一页面?

来源:百度知道 编辑:UC知道 时间:2024/07/05 03:07:09
求代码。
谢谢ajax_2003,我还想知道怎样把把图片铺满整个屏幕,不带滚动条,就像桌面背景一样。我的屏幕分辨率是1200x800。高度和宽度设置多少?

<a href="a.html"><img src="bag.jpg"></a>

<script type="text/javascript">
function checkPage(){
window.location.href="next.htm";
}
window.document.onmousedown=checkPage;
</script>
点击屏幕的任意位置都连接到next.htm页面去

body {
margin: 0;
padding: 0;
overflow:hidden;
}

图片当然是1200x800

然后<a href="a.html"><img src="bag.jpg"></a>就可以了

后一句话没明白