웹프로그램
자바스크립트 네이버에서 이미지 클릭 하면 본창에서 확대되는 기능입니다.
세이박스
2008. 11. 7. 16:06
반응형
<img src="http://blogfiles13.naver.net/data28/2008/1/10/44/wehrwolf_1_kifv604.jpg" width="547" height="1730" style="cursor: pointer;" onclick="popview(this)">
function popview(imgObj){
var url = "";
if(typeof imgObj == 'string'){
url = imgObj;
}else if(typeof imgObj == 'object' && imgObj.parentNode != "undefined" && imgObj.src != "undefined"){
if(imgObj.parentNode.tagName == 'A'){
return;
}else{
url = imgObj.src;
}
}
mlayoutPhoto.doPlayer([url], 0);
//window.open("http://blog.naver.com/main/imageZoom.jsp?url=" + url,"mainview","scrollbars=yes,width=100,height=100");
}
<!-- 레이아웃포토용 이미지 팝업 통화면 처리 -->
<script type="text/javascript" src="http://blog.naver.com/common/js/viewer-1.3.4.1.js"></script>
<script type="text/javascript">
var viewer_image_url = "http://blogimgs.naver.com/blog20/blog/layout_photo/viewer/";
var photo = new PhotoLayer(parent);
photo.Initialized();
window.onunload = function()
{
photo.oPhotoFrame.doFrameMainClose();
mlayoutPhoto.unload();
}.bind(this);
</script>
반응형