Пишу так:
| Код | <script language="JavaScript"> <!-- function openWin(windowURL,windowName,windowFeatures) { return window.open(windowURL,windowName,windowFeatures) }; var newWin; function openW(url) { var width = 400; var height = 300; var left = parseInt((screen.availWidth/2) - (width/2)); var top = parseInt((screen.availHeight/2) - (height/2)); var windowFeatures = "width=" + width + ",height=" + height + ",status,resizable,left=" + left + ",top=" + top + ",screenX=" + left + ",screenY=" + top + "toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1"; newWin = openWin(url,'Kartinka1', windowFeatures); newWin.focus(); } --> </script>
|
И вызываю:
| Код | <a href="#" onClick="openW('new.gif')">Kartinka1</a>
|
Возможно ли, чтобы размеры нового окна были по размеру картинки? |