묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
플래시랑 연동(?) 하던 새창띄우기 스크립트인데요..
2004.04.01 19:10
http://www.two-man.com 의 미완성무비에서 퍼온건데..
여기서 지워도 되는부분 있나요?
플래시랑 같이 쓰는거였으니 플래시랑 관련된건 지워도 될까 싶은데..
<script>
function mxlife03(src) {
var imgObj = new Image();
imgObj.src = src;
var wopt = "scrollbars=no,status=no,resizable=no,left=20,top=20";
wopt += ",width=" + imgObj.width;
wopt += ",height=" + imgObj.height;
var wbody = "<head><title>Image</title>";
wbody += "<script language='javascript'>";
wbody += "function finalResize(){";
wbody += " var oBody=document.body;";
wbody += " var oImg=document.images[0];";
wbody += " var xdiff=oImg.width-oBody.clientWidth;";
wbody += " var ydiff=oImg.height-oBody.clientHeight;";
wbody += " window.resizeBy(xdiff,ydiff);";
wbody += "}";
wbody += "</"+"script>";
wbody += "</head>";
wbody += "<body onLoad='finalResize()' style='margin:0'>";
wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>";
wbody += "</body>";
winResult = window.open("about:blank","",wopt);
winResult.document.open("text/html", "replace");
winResult.document.write(wbody);
winResult.document.close();
return;
}
</script>
여기서 지워도 되는부분 있나요?
플래시랑 같이 쓰는거였으니 플래시랑 관련된건 지워도 될까 싶은데..
<script>
function mxlife03(src) {
var imgObj = new Image();
imgObj.src = src;
var wopt = "scrollbars=no,status=no,resizable=no,left=20,top=20";
wopt += ",width=" + imgObj.width;
wopt += ",height=" + imgObj.height;
var wbody = "<head><title>Image</title>";
wbody += "<script language='javascript'>";
wbody += "function finalResize(){";
wbody += " var oBody=document.body;";
wbody += " var oImg=document.images[0];";
wbody += " var xdiff=oImg.width-oBody.clientWidth;";
wbody += " var ydiff=oImg.height-oBody.clientHeight;";
wbody += " window.resizeBy(xdiff,ydiff);";
wbody += "}";
wbody += "</"+"script>";
wbody += "</head>";
wbody += "<body onLoad='finalResize()' style='margin:0'>";
wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>";
wbody += "</body>";
winResult = window.open("about:blank","",wopt);
winResult.document.open("text/html", "replace");
winResult.document.write(wbody);
winResult.document.close();
return;
}
</script>