這里有一個例子,是打開和一個圖象大小的窗口,隨圖象大小任意變化,你可以相似發(fā)揮。要看更多的請到 http://elove.heha.net
<SCRIPT LANGUAGE="JavaScript">
var isNav4, isIE4;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}
function fitWindowSize() {
if (isNav4) {
window.innerWidth = document.layers[0].document.images[0].width;
window.innerHeight = document.layers[0].document.images[0].height;
}
if (isIE4) {
window.resizeTo(500, 500);
width = 500 - (document.body.clientWidth - document.images[0].width);
height = 500 - (document.body.clientHeight - document.images[0].height);
window.resizeTo(width, height);
}
}
</script>
posted on 2007-06-14 16:26
Lib 閱讀(604)
評論(0) 編輯 收藏 所屬分類:
網(wǎng)頁特效