高山流水
msgbartop
动之则分,静之则合,无过不及,随曲就伸。
msgbarbottom

28 九 06 根据客户端分辨率改变图像大小的JS脚本

<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: , , ,