.
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>삶의향기</title>
<meta name="generator" content="Namo WebEditor v5.0">
<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>
<link rel="stylesheet" href="style.css">
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p align="center"><a href="javascript:doNothing()" onClick="win1Open=displayImage('imge/2.jpg', 'popWin1', '300', '300')" onMouseOver="window.status='Click to display picture'; return true;" onMouseOut="window.status=''"><img src="imge/2.jpg" border="0" width="100" height="100"></a>
<table align="center" border="0" cellspacing="0" width="450" bordercolordark="white" bordercolorlight="black">
<tr>
<td width="973">
<p align="center">그림으로만 새창을 띄우기 때문에
<p align="center">불필요한 문서 여러개를 만드는 수고를 덜 수 있습니다. </p>
<p align="center">창으로 뜬 문서의 그림에 마우스를 클릭하면 닫히기 때문에
창 닫기도 편합니다.<BR></p>
</td>
</tr>
</table>
<p align="center"><input type=button name=bt_s value="소스보기" onClick='window.location="view-source:"+window.location.href'>
</body>
</html>
'Javascript' 카테고리의 다른 글
지정 경로로 되돌아가기 (0) | 2016.05.30 |
---|---|
뒤로, 앞으로, 새로고침, 창닫기, 위로 버튼 만들기 (0) | 2016.05.30 |
대문으로 들어오기 (0) | 2016.05.30 |
홈페이지 암호화 하기 (0) | 2016.05.30 |
아래위서 나오는 (0) | 2016.05.30 |