Начало
Детали страницы
Изображение Sized Window
Размеры нового всплывающешго окна, чтобы посмотреть точные размеры изображения в этом окне.
Open Image Window
JavaScript Page Details: Изображение Sized Window
<!-- FOUR STEPS TO INSTALL IMAGE SIZED WINDOW: 1. Insert the HEAD section into a new file, save as image-window.html 2. Add the onLoad event handler into the BODY tag of image-window.html 3. Put the last coding into the BODY section of image-window.html 4. Place the window opening code into your regular HTML page --> <!-- STEP ONE: Paste this code into the HEAD of image-window.html --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin 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); } } // End --> </script> </HEAD> <!-- STEP TWO: Insert the onLoad event handler to image-window.html --> <BODY onLoad="fitWindowSize()"> <!-- STEP THREE: Copy this code into the BODY of image-window.html --> <div style="position:absolute; left:0px; top:0px"> <img src="image.gif" alt="JSS Logo" width="267" height="103"> </div> <!-- STEP FOUR: Paste this code into your window opening page --> <a href="image-window.html" target="_blank">Open Image Window</a> <p><center> <font face="arial, helvetica" SIZE="-2">Free JavaScripts<br> by <a href="http://javascripts-do.narod.ru">JavaScripts</a></font> </center><p> <!-- Script Size: 1.59 KB -->