Tags: javascript, vbscript, 帮助
<img id=”img1″ src=”img/photo/p01.jpg”>
<script language=javascript>
if(window.screen.width == 800 && window.screen.height ==
600){
document.getElementById(”img1″).width=”480″;
document.getElementById(”img1″).height=”360″;
} else if(window.screen.width == 1024&&
window.screen.height == 768){
document.getElementById(”img1″).width=”640″;
document.getElementById(”img1″).height=”480″;
}
</script>
Tags: javascript, 分辨率, 图像大小, 开放代码