그누스킨중에 텍스트 확대/축소하는 스킨 있나요? 정보
그누스킨중에 텍스트 확대/축소하는 스킨 있나요?본문
..
제목에 질문이 다 있네요 ^^;;
저두 보긴 했는데 스킨 자료실에서 찾으려니 안보이네요..
아래 소스 적용하려고 하는데요.. 기존 스킨에서는 어떻게 처리했는지 한번 보려구요..^^
..
<script>
function getStyleObject(objectId) {
if(document.getElementById && document.getElementById(objectId)) {
return document.getElementById(objectId).style;
}
else if (document.all && document.all(objectId)) {
return document.all(objectId).style;
}
else if (document.layers && document.layers[objectId]) {
return document.layers[objectId];
} else {
return false;
}
}
function getObject(objectId) {
if(document.getElementById && document.getElementById(objectId)) {
return document.getElementById(objectId);
}
else if (document.all && document.all(objectId)) {
return document.all(objectId);
}
else if (document.layers && document.layers[objectId]) {
return document.layers[objectId];
} else {
return false;
}
}
function getIframDocument(iframeObject) {
if(navigator.appName.indexOf("Internet Explorer") == -1) {
return iframeObject.contentDocument
} else {
return iframeObject.Document
}
}
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return (document.cookie.substring(offset, endstr));
}
function FixCookieDate (date) {
var base = new Date(0);
var skew = base.getTime(); // dawn of (Unix) time - should be 0
if (skew > 0) // Except on the Mac - ahead of its time
date.setTime (date.getTime() - skew);
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name,value,expires,path,domain,secure) {
document.cookie = name + "=" + (value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
}
function DeleteCookie (name,path,domain) {
path = "/";
if (GetCookie(name)) {
document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}
document.onkeypress = getKey;
function getKey(keyStroke) {
isNetscape=(document.layers);
eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
which = String.fromCharCode(eventChooser).toLowerCase();
which2 = eventChooser;
var el=event.srcElement;
if ((el.tagName != "INPUT") && (el.tagName != "TEXTAREA"))
{
if(which == "+" )
zoomInOut('zoom', 'in');
else if(which == "-" )
zoomInOut('zoom', 'out');
}
}
var zoomRate = 10;
var maxRate = 300;
var minRate = 100;
var divMenu_left;
function zoomInOut(contentid, how) {
if(GetCookie("zoomVal") != null && GetCookie("zoomVal") != ""){
document.all[contentid].style.zoom = GetCookie("zoomVal");
STATICMENU.style.zoom = GetCookie("zoomVal");
currZoom=GetCookie("zoomVal");
}
else{
document.all[contentid].style.zoom = '100%';
STATICMENU.style.zoom = '100%';
currZoom = '100%';
}
if (((how == "in") && (parseInt(currZoom) >= maxRate)) || ((how == "out") && (parseInt(currZoom) <= minRate)) ) {
return;
}
if (how == "in") {
document.all[contentid].style.zoom = parseInt(document.all[contentid].style.zoom)+zoomRate+'%';
STATICMENU.style.zoom = parseInt(STATICMENU.style.zoom)+zoomRate+'%';
}
else {
document.all[contentid].style.zoom = parseInt(document.all[contentid].style.zoom)-zoomRate+'%';
STATICMENU.style.zoom = parseInt(STATICMENU.style.zoom)-zoomRate+'%';
}
expires = new Date();
expires.setTime(expires.getTime() + 24 * 60 * 60 * 365 * 5);
SetCookie("zoomVal",document.all[contentid].style.zoom,expires,"/","","");
//SetCookie("SeatLeft",STATICMENU.style.left,expires,"/","","");
GoZoomLeft();
}
function GoZoom(contentid){
var rate = parseInt(GetCookie("zoomVal")) - 100;
if(GetCookie("zoomVal") != null && GetCookie("zoomVal") != ""){
document.all[contentid].style.zoom = GetCookie("zoomVal");
STATICMENU.style.zoom = GetCookie("zoomVal");
currZoom=GetCookie("zoomVal");
}
else{
document.all[contentid].style.zoom = '100%';
STATICMENU.style.zoom = '100%';
currZoom = '100%';
}
GoZoomLeft();
}
function GoZoomMain(contentid){
if(GetCookie("zoomVal") != null && GetCookie("zoomVal") != ""){
document.all[contentid].style.zoom = GetCookie("zoomVal");
currZoom=GetCookie("zoomVal");
}
else{
document.all[contentid].style.zoom = '100%';
currZoom = '100%';
}
}
function GoZoomLeft(){
var rate = 0 ;
if(GetCookie("zoomVal") != null && GetCookie("zoomVal") != ""){
rate = parseInt(GetCookie("zoomVal")) - 100;
}
document.all['STATICMENU'].style.top = 3*rate ;
document.all['STATICMENU'].style.left = 1.3*rate;
}
</script>
</head>
<body onload="javascript:GoZoomMain('zoom');">
<DIV ID="zoom">
<a href="javascript:zoomInOut('zoom','in');">확대</a> | <a href="javascript:zoomInOut('zoom','out');">축소</a><p>
<img src=http://www.blueb.co.kr/SRC/javascript/image/010.gif><img src=http://www.blueb.co.kr/SRC/javascript/image/020.gif><br>
버튼을 클릭하면 지정된 영역 모든 오브젝트가 확대/축소 됩니다.
쿠키를 적용하여 페이지를 새로고침하더라도 확대/축소된크기를 계속 유지합니다.
</div>
<div id="STATICMENU"></DIV>
추천
0
0
댓글 2개

그누보드 기본 basic 스킨에 버튼만 없을 뿐 구현되어 있습니다.
링크 + - 눌러보면 알 수 있습니다.
http://zombi.kr/bbs/board.php?bo_table=B000001&wr_id=157109
링크 + - 눌러보면 알 수 있습니다.
http://zombi.kr/bbs/board.php?bo_table=B000001&wr_id=157109
^^ 불..친절하게 링크까지 남겨 주시고... 감사합니다