자바스크립트 웹브라우저 호환문의
본문
안녕하세요.
인터넷에서 팝업창으로 일부 영역만 보이게하는 소스를 찾아서 적용했는데
익스플로러에서만 작동이 되네요ㅠㅠ
크롬이나 파이어폭스등 타브라우저나 모바일에서는 안되서요..
도움 좀 부탁드립니다^^;
<
html
>
<
head
>
<
SCRIPT
LANGUAGE
=
"JavaScript"
>
<!--
function popup(){
var url = "http://www.hira.or.kr/rdc_hospsearch.hospsearch.do?method=hospital&pgmid=HIRAA020101000000";
var setSring = "<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>"+
"<script>"+
" function setXy() {"+
" var obj = document.getElementById('view'); "+
" obj.scrollTop = 230; "+
" obj.scrollLeft = 555; "+
" obj.style.width = 730; "+
" obj.style.height = 410; "+
" } "+
"<\/script>"+
"<body style='margin:0000'>"+
"<div id='view' style='width:1px; height:0px; overflow-x:hidden; overflow-y:hidden;'>"+
"<iframe src='"+url+"' style='width:1700px; height:1400px;' scrolling='no' onload='setXy();'></iframe>"+
"</div>"+
"</body>";
var MyWindow=window.open('','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=730,height=410,left=300,top=400');
MyWindow.document.write(setSring);
}
//-->
</
SCRIPT
>
</
head
>
<
body
>
<
input
type
=
"button"
value
=
"병원"
onclick
=
"popup()"
>
</
body
>
</
html
>
답변을 작성하시기 전에 로그인 해주세요.