View

새창띄우기

수퍼곰탱이 2007. 5. 10. 00:40
1번. 스크립트 필요없이 새창 띄우기
<a href=# onclick="window.open('pds_1_2.htm','name','resizable=no width=500 height=700');return false">

--------------
----------------------------------------------------------------------

2번.HTML 문서없이 새창 띄우기 (주로 갤러리에서 큰 그림보기에 사용됨)

<script language="JavaScript">
<!--
var win1Open = null

function displayImage(picName, windowName, windowWidth, windowHeight){
return window.open(picName,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + (parseInt(windowWidth)+20) + ",height=" + (parseInt(windowHeight)+15))
}

function winClose(){
if(win1Open != null) win1Open.close()
}

function doNothing(){}
//-->
</script>

<script language="JavaScript1.1">
<!--
function displayImage(picName, windowName, windowWidth, windowHeight){
var winHandle = window.open("" ,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + windowWidth + ",height=" + windowHeight)
if(winHandle != null){
var htmlString = "<html><head><title>Picture</title></head>"
htmlString += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>"
htmlString += "<a href=javascript:window.close()><img src=" + picName + " border=0 alt=닫기></a>"
htmlString += "</body></html>"
winHandle.document.open()
winHandle.document.write(htmlString)
winHandle.document.close()
}
if(winHandle != null) winHandle.focus()
return winHandle
}
//-->
</script>


<a href="javascript:doNothing()" onClick="win1Open=displayImage('kissgod01.jpg', 'popWin1', '370', '529')" onMouseOver="window.status='Click to display picture'; return true;" onMouseOut="window.status=''"><img src="kissgod01t.jpg" border="0"></a>

------------------------------------------------------------------------------------

3번.자동으로 새창 띄우기

<script language="JavaScript">
<!--
function newsWindow()
{window.open('kissgod.htm','SmallWindow','width=200,height=200,scrollbars=no');}
// -->
</script>

<body onload="newsWindow()">

Share Link
reply
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30