이미지 클릭시 팝업으로 띄우는 방법
본문
이미지를 클릭시 새창이 아니라 팝업으로 띠우는 방법좀 알려주세요?
답변 2
<img src="이미지경로" style="cursor:pointer" onclick="window.open('새창페이지URL','asdfo8or','scrollbars=yes,width=417,height=385,top=10,left=20');">
자바스크립트로 아래와 같이 연동하셔야 합니다.
<script language="javascript">
function new(){
window.open("test.asp","new",
"width=300, height=200, left=30, top=30,
scrollbars=no,titlebar=no,status=no,resizable=no,fullscreen=no");
}
</script>
<img src="이미지주소" onClick="new()" style="cursor:hand"/>
답변을 작성하시기 전에 로그인 해주세요.