'2008/02'에 해당되는 글 999건

  1. 2008.02.01 마우스 오른쪽 클릭시 컨텍스트 메뉴(context menu)
  2. 2008.02.01 문서 없이 자동으로 이미지 크기에 맞게 새창 및 .....
  3. 2008.02.01 표의 한줄 숨겼다가 나왔다가 제어하기
  4. 2008.02.01 랜덤 이미지 마우스오버시 롤오버 시키기
  5. 2008.02.01 배경그림을 정해진 시간마다 바꿉니다
  6. 2008.02.01 링크에대한 설명을 간단히 보여드립니다
  7. 2008.02.01 ie 버전에 따라서 페이지 접속 시키기
  8. 2008.02.01 간단한 공지
  9. 2008.02.01 페이지 테두리 넣어 깜밖이기
  10. 2008.02.01 다이나믹 컬러 색상표
  11. 2008.02.01 프레임 나누어진 페이지 늘리기 - 확장시키기
  12. 2008.02.01 프레임 나타내기(히든프레임)와 숨기기
  13. 2008.02.01 셀렉트 박스 새창과 현재창을 라이오 버튼으로 제어
  14. 2008.02.01 셀렉트를 이용해서 이미지 선택 나타내기
  15. 2008.02.01 이미지 슬라이드
  16. 2008.02.01 쿠키 적용으로 체크하면 다음부터는 뜨지 않는 창
  17. 2008.02.01 이미지에 섬광 효과 주기
  18. 2008.02.01 자바스크립트와 테이터베이스 연동
  19. 2008.02.01 이미지 슬라이드
  20. 2008.02.01 TextField의 Align - 텍스트 정렬 및 콤마 찍기
  21. 2008.02.01 텍스트 애니메이션
  22. 2008.02.01 웹페이지 대화상자 (부모창 위에 새창이 항상 최상위에 존재)
  23. 2008.02.01 다중 셀렉트(select) 박스 3
  24. 2008.02.01 input 또는 폼안의 포커스 이동 및 글자 길이 제한
  25. 2008.02.01 매월 마지막 날자 구하기
  26. 2008.02.01 문서길이를 자동으로 맞추는 아이프레임 리사이즈 소스 6가지
  27. 2008.02.01 체크박스 전체선택 / 전체해제
  28. 2008.02.01 마우스 좌표값
  29. 2008.02.01 스크립트 인코딩 (Windows Script Encoder)
  30. 2008.02.01 익스플로러에서 인쇄 누르면 페이지 이동 시키기

http://oxtag.com/html/ex/mouse/mouse_context/mouse2.htm

<!--


// 마우스 오른쪽버튼 메뉴

var isIE = 0;
if(window.navigator.appName == 'Microsoft Internet Explorer' && window.navigator.appVersion.substring(window.navigator.appVersion.indexOf('MSIE') + 5,window.navigator.appVersion.indexOf('MSIE') + 8) >= 5.5) {
 isIE = 1;
} else {
 isIE = 0;
}
if(isIE) {
 var HTML = "<table width=100% bgcolor=white border=0 cellpadding=0 cellspacing=0 style='font-family:굴림;font-size:9pt;color:#323232;border:1 #323232 solid;cursor:default' ";
 HTML += "onContextMenu='return false' onDragStart='return false' onSelectStart='return false' onMouseUp='parent.nContext.show(0,0,document.body)'>\n";
 HTML += "<tr><td height=23 align=center bgcolor=#969696 onMouseUp=\"alert('http://oxtag.com/')\"><img src='./img/c_title.gif' width=113 height=15 align=middle border=0 alt='컨텍스트 메뉴입니다. ^-^;'></td></tr>\n";
 HTML += "<tr height=23 style='padding-top:3' onMouseOver=\"this.style.backgroundColor='#cccccc'\" onMouseOut=\"this.style.backgroundColor=''\" title='이전 페이지로 이동'>\n";
 HTML += "<td onMouseUp='parent.history.go(-1)'><img src='./img/c_back.gif' width=9 height=9 align=middle border=0 hspace=7>뒤로</td></tr>\n";
 HTML += "<tr height=1><td background='./img/dot_b.gif'></td></tr>";
 HTML += "<tr height=23 style='padding-top:3' onMouseOver=\"this.style.backgroundColor='#cccccc'\" onMouseOut=\"this.style.backgroundColor=''\" title='앞 페이지로 이동'>\n";
 HTML += "<td onMouseUp='parent.history.go(1)'><img src='./img/c_fwd.gif' width=9 height=9 align=middle border=0 hspace=7>앞으로</td></tr>\n";
 HTML += "<tr height=1><td background='./img/dot_b.gif'></td></tr>";
 HTML += "<tr height=23 style='padding-top:3' onMouseOver=\"this.style.backgroundColor='#cccccc'\" onMouseOut=\"this.style.backgroundColor=''\" title='태그피아 홈페이지를 즐겨찾기에 추가'>\n";
 HTML += "<td onMouseUp=\"window.external.AddFavorite('http://oxtag.com/','♡ 카멜롯™의 소스천국 태그피아 ♡');\"><img src='./img/c_fav.gif' width=9 height=9 align=middle border=0 hspace=7>즐겨찾기에 추가</td></tr>\n";
 HTML += "<tr height=1><td background='./img/dot_b.gif'></td></tr>";
 HTML += "<tr height=23 style='padding-top:3' onMouseOver=\"this.style.backgroundColor='#cccccc'\" onMouseOut=\"this.style.backgroundColor=''\" title='현재 페이지를 인쇄합니다.'>\n";
 HTML += "<td onMouseUp='parent.print()'><img src='./img/c_print.gif' width=9 height=9 align=middle border=0 hspace=7>인쇄</td></tr>\n";
 HTML += "<tr height=1><td background='./img/dot_b.gif'></td></tr>";
 HTML += "<tr height=23 style='padding-top:3' onMouseOver=\"this.style.backgroundColor='#cccccc'\" onMouseOut=\"this.style.backgroundColor=''\" title='현재 페이지를 새로 고칩니다.'>\n";
 HTML += "<td onMouseUp='parent.location.reload()'><img src='./img/c_reld.gif' width=9 height=9 align=middle border=0 hspace=7>새로 고침</td></tr>\n";
 HTML += "<tr height=1><td bgcolor=#646464></td></tr>";
 HTML += "<tr height=23 style='padding-top:3' onMouseOver=\"this.style.backgroundColor='#cccccc'\" onMouseOut=\"this.style.backgroundColor=''\" title='현재 페이지 내용을 모두 선택합니다.'>\n";
 HTML += "<td onMouseUp='parent.selectAll()'><img src='./img/c_sele.gif' width=9 height=9 align=middle border=0 hspace=7>모두 선택</td></tr>\n";
 HTML += "<tr height=1><td background='./img/dot_b.gif'></td></tr>";
 HTML += "<tr height=23 style='padding-top:3' onMouseOver=\"this.style.backgroundColor='#cccccc'\" onMouseOut=\"this.style.backgroundColor=''\" title='선택한 영역을 복사합니다.'>\n";
 HTML += "<td onMouseUp='parent.copyText()'><img src='./img/c_copy.gif' width=9 height=9 align=middle border=0 hspace=7>복사</td></tr>\n";
 HTML += "<tr height=1><td background='./img/dot_b.gif'></td></tr>";
 HTML += "<tr height=23 style='padding-top:3' onMouseOver=\"this.style.backgroundColor='#cccccc'\" onMouseOut=\"this.style.backgroundColor=''\" title='클립보드 내용을 붙여넣습니다.'>\n";
 HTML += "<td onMouseUp='parent.pasteText()'><img src='./img/c_paste.gif' width=9 height=9 align=middle border=0 hspace=7>붙여넣기</td></tr>\n";
 HTML += "<tr height=1><td background='./img/dot_b.gif'></td></tr>";
 HTML += "<tr height=23 style='padding-top:3' onMouseOver=\"this.style.backgroundColor='#cccccc'\" onMouseOut=\"this.style.backgroundColor=''\" title='선택한 텍스트를 강조합니다.'>\n";
 HTML += "<td onMouseUp='parent.highlightText()'><img src='./img/c_hlight.gif' width=9 height=9 align=middle border=0 hspace=7>강조</td></tr>\n";
 HTML += "<tr height=1><td background='./img/dot_b.gif'></td></tr>";
 HTML += "<tr height=23 style='padding-top:3' onMouseOver=\"this.style.backgroundColor='#cccccc'\" onMouseOut=\"this.style.backgroundColor=''\" title='선택한 텍스트를 검색합니다. (네이버)'>\n";
 HTML += "<td onMouseUp='parent.searchText()'><img src='./img/c_srch.gif' width=9 height=9 align=middle border=0 hspace=7>단어 검색</td></tr>\n";
 // HTML +='<TR><TD STYLE="border:0pt solid #FFFFFF" ID="i8" ONMOUSEOVER="document.all.i8.style.background=\'#FFFFFF\';document.all.i8.style.border=\'0pt solid #737B92\';" ONMOUSEOUT="document.all.i8.style.background=\'\';document.all.i0.style.border=\'0pt solid #CCCCCC\';" ONCLICK="if(window.parent.document.body.style.zoom!=0) window.parent.document.body.style.zoom*=1.6; else window.parent.document.body.style.zoom=1.6;"> <img SRC="./img/menuzoom.gif" WIDTH="12" HEIGHT="12" BORDER="0" HSPACE="0" VSPACE="0" ALIGN="absmiddle"> 확대해서보기</TD></TR>';
 // HTML +='<TR><TD STYLE="border:0pt solid #FFFFFF" ID="i9" ONMOUSEOVER="document.all.i9.style.background=\'#FFFFFF\';document.all.i9.style.border=\'0pt solid #737B92\';" ONMOUSEOUT="document.all.i9.style.background=\'\';document.all.i0.style.border=\'0pt solid #CCCCCC\';" ONCLICK="if(window.parent.document.body.style.zoom!=0) window.parent.document.body.style.zoom*=0.625; else window.parent.document.body.style.zoom=0.625;"> <img SRC="./img/menuzoom.gif" WIDTH="12" HEIGHT="12" BORDER="0" HSPACE="0" VSPACE="0" ALIGN="absmiddle"> 축소해서보기</TD></TR>';
 HTML += "</table>";
 var nContext = window.createPopup();
}

function dnContext(x,y) {
 if(isIE) {
  var nContextBody = nContext.document.body;
  nContextBody.innerHTML = HTML;
  nContext.show(x,y,140,264,document.body);
 }
}

function showContext(e) {
 if(isIE) {
  if(document.all) {
   if(event.button == 2 || event.button == 3) {
    dnContext(event.x,event.y);
   }
  }
 }
}

if(isIE) {
 document.oncontextmenu = function() {
  dnContext(event.x,event.y);
  return false;
 }
 document.onmouseclick = showContext;
}


// 마우스 오른쪽버튼 메뉴용 보조 도구

function selectAll() {
 document.body.createTextRange().select();
}

function copyText() {
 var sel = document.selection;
 var rng = sel.createRange();
 rng.execCommand('Copy');
}

function pasteText() {
 var sel = document.selection;
 var rng = sel.createRange();
 rng.execCommand('Paste');
 // alert(' 아직 스크립트가 불완전하여 구현되지 않습니다. \n\n    Windows 붙여넣기 단축키는 [Ctrl + V] 입니다.');
}

function highlightText() {
 var sel = document.selection;
 var rng = sel.createRange();
 var str = new String(rng.text);
 if (str == '') {
  alert(' 강조할 영역이 선택되지 않았습니다. \n\n    강조할 영역(텍스트)를 긁으세요.');
 } else {
  rng.execCommand('BackColor',0,'yellow');
 }
}

function searchText() {
 var sel = document.selection;
 var rng = sel.createRange();
 var str = new String(rng.text);
 var searchWin = new String('http://search.naver.com/search.naver?where=nexearch&query=' + str);
 if (str == '') {
  alert(' 검색할 단어가 없습니다. \n\n 먼저 텍스트를 긁으세요. ');
 } else {
  window.open(searchWin);
 }
}


//-->

Posted by 알 수 없는 사용자
,

http://oxtag.com/html/ex/popup/img_win/img_win.html

문서 없이 자동으로 이미지 크기에 맞게 새창으로 그림을 띄웁니다.
전체화면으로 열 수 있는 F11 키 제어 했구요.
마우스도 감지 못하게 했습니다.
그리고, 화면 중앙에 열리게 했구요.
소스는 상단의 미리보기를....



function view(what) { 
var imgwin = window.open('','','scrollbars=no,status=no,toolbar=no,resizable=1,location=no,menu=no,width=10,height=10'); 
imgwin.document.open(); 
imgwin.document.write("<html>\n"); 
imgwin.document.write("<head>\n"); 
imgwin.document.write("<title>♡ 카멜롯™의 소스천국 태그피아 ♡</title>\n");
imgwin.document.write("<META HTTP-EQUIV='imagetoolbar' CONTENT='no'>\n"); // IE 이미지 툴바 제거
imgwin.document.write("<script>\n");
imgwin.document.write(" document.onkeydown=KeyEventHandle;\n");   // F11 키 제어
imgwin.document.write(" document.onkeyup=KeyEventHandle;\n");
imgwin.document.write(" document.onkeydown=KeyEventHandle;\n");
imgwin.document.write(" document.onkeyup=KeyEventHandle;\n");
imgwin.document.write(" function KeyEventHandle()\n");
imgwin.document.write(" {\n");
imgwin.document.write("    if  (event.keyCode == 122)\n");
imgwin.document.write("     { \n");
imgwin.document.write("                 event.keyCode = 0;\n");
imgwin.document.write("                 event.cancelBubble = true;\n");
imgwin.document.write("                 event.returnValue = false;\n");
imgwin.document.write("         alert ('윈도우를 종료합니다');\n");
imgwin.document.write("         self.close();     \n");
imgwin.document.write("    }\n");
imgwin.document.write(" }\n");       // F11 키 제어 끝.
imgwin.document.write("var isNav4, isIE4;\n");
imgwin.document.write("var windowX, windowY;\n");
imgwin.document.write("var bLargeImage = 0;\n");
imgwin.document.write("var x,y;\n");
imgwin.document.write("\n");
imgwin.document.write("if (parseInt(navigator.appVersion.charAt(0)) >= 4)\n");
imgwin.document.write("{\n");
imgwin.document.write("    isNav4 = (navigator.appName == 'Netscape') ? 1 : 0;\n");
imgwin.document.write("    isIE4 = (navigator.appName.indexOf('Microsoft') != -1) ? 1 : 0;\n");
imgwin.document.write("}\n");
imgwin.document.write("\n");
imgwin.document.write("function fitWindowSize()\n");
imgwin.document.write("{\n");
imgwin.document.write("    if (isNav4) {\n");
imgwin.document.write("        window.innerWidth = document.layers[0].document.images[0].width;\n");
imgwin.document.write("        window.innerHeight = document.layers[0].document.images[0].height;\n");
imgwin.document.write("    }\n");
imgwin.document.write("    if (isIE4) {\n");
imgwin.document.write("        window.resizeTo(500, 500);\n");
imgwin.document.write("        width = 500 - (document.body.clientWidth -  document.images[0].width);\n");
imgwin.document.write("        height = 500 - (document.body.clientHeight -  document.images[0].height)\n");
imgwin.document.write("        windowX = (window.screen.width-width)/2;\n");
imgwin.document.write("        windowY = (window.screen.height-height)/2;\n");
imgwin.document.write("        if(width>screen.width){\n");
imgwin.document.write("            width = screen.width;\n");
imgwin.document.write("            windowX = 0;\n");
imgwin.document.write("            bLargeImage = 1;\n");
imgwin.document.write("        }\n");
imgwin.document.write("        if(height>screen.height-50){\n");
imgwin.document.write("            height = screen.height-50;\n");
imgwin.document.write("            windowY = 0;\n");
imgwin.document.write("            bLargeImage = 1;\n");
imgwin.document.write("        }\n");
imgwin.document.write("        x = width/2;\n");
imgwin.document.write("        y = height/2;\n");
imgwin.document.write("        window.moveTo(windowX,windowY);\n");
imgwin.document.write("        window.resizeTo(width, height);\n");
imgwin.document.write("    }\n");
imgwin.document.write("}\n");
imgwin.document.write("function move()\n");
imgwin.document.write("{\n");
imgwin.document.write("    if(bLargeImage)\n");
imgwin.document.write("    window.scroll(window.event.clientX - 50,window.event.clientY -50);\n");
imgwin.document.write("}\n");
imgwin.document.write("</script>");
imgwin.document.write("</head>"); 
imgwin.document.write('<body onLoad="fitWindowSize();" onmousemove="move();" onclick=window.close() topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF" oncontextmenu="return false" onselectstart="return false" ondragstart="return false" onkeydown="return false">'); 
imgwin.document.write("<a href='#a' onfocus=this.blur() style='cursor:move'><img border=0 src="+what+" xwidth=100 xheight=9 name=il onload='resize();'></a>"); 
imgwin.document.write("</body>");
imgwin.document.write("</html>"); 
imgwin.document.close(); 

}

Posted by 알 수 없는 사용자
,

<p onClick="test.style.display='';">보이기</p>
<p onClick="test.style.display='none';">감추기</p>

<table border=1>
<tr id=test style="display:none;">
<td> 이 줄이 숨겨질 것입니다. </td>
</tr>
<tr>
<td>이 줄은 남아있겠지요.</td>
</tr>
</table>

위 소스를 보면 id  가 test라고 된 줄이 사라졌다가 생기는 것을 볼 수 있습니다.
이는 style 의 display 속성에 의한 것으로 표만 사용할 수 있는것이 아니라,
div 태그로도 응용해서 사용할 수 있습니다.
Posted by 알 수 없는 사용자
,
http://oxtag.com/html/ex/random/ImgOver_Rand/imgover_rand.html

<script>
// 랜덤 롤오버 이미지
// 만든넘 : 카멜롯™, http://oxtag.com/, tagpia@hotmail.com
       
        var bgimg
        do bgimg = Math.random().toString().charAt(2);
        while (bgimg > 5 || bgimg < 1);        // 5는 이미지 개수, 1은 이미지 파일명 시작 번호.
       
                // 마우스 오버시 나타날 이미지
                imgrandon = new Image;
                imgrandon.src = "./over/top_btn_" +bgimg+ "_on.gif";        // 이미지 파일명은 top_btn_1_on.gif, top_btn_2_on.gif, top_btn_3_on.gif,....
                // 마우스 아웃시 나타날 이미지
                imgrandoff = new Image;
                imgrandoff.src = "./out/top_btn_" +bgimg+ ".gif";        // 이미지 파일명은 top_btn_1.gif, top_btn_2.gif, top_btn_3.gif,...

        function img_on(imgName) {
                imgOn = eval(imgName + "on.src");
                document[imgName].src = imgOn;
        }

        function img_off(imgName) {
                imgOff = eval(imgName + "off.src");
                document[imgName].src = imgOff;
        }

        document.writeln("<a href='#None' onMouseOver=\"img_on('imgrand');\" onMouseout=\"img_off('imgrand');\"><img src=./out/top_btn_" +bgimg+ ".gif border=0 width=90 height=59 align=abdmiddle name='imgrand'></a>");

</script>

페이지 접속시마다 이미지가 랜덤으로 바뀌고, 이미지가 롤오버됨니다.

마우스를 이미지에 올려보세요. 롤오버되죠.

새로 고침도 해보시구요. 마우스도 올려보세요.

처음 나타나는 이미지는 out 폴더에 넣습니다.

마우스 오버시 나타나는 이미지는 over 폴더에 넣으세요.

위 소스를 보시면 느끼시겠지만 파일명은 abc_1_on.gif 와 abc_1.gif

이러한 형태로 숫자만 똑 같이 늘려서 이미지를 만드시면 됨니다.
Posted by 알 수 없는 사용자
,
아래소스를 헤드부분에 넣으시구요...
이미지부분은 고치시구요..시간부분도 고치세요...
<SCRIPT language="JavaScript">
//이미지주소를 쓰시오
var backgroundimage=new Array("bgimage1.jpg","bgimage2.jpg","bgimage3.jpg","bgimage4.jpg","bgimage5.jpg","bgimage6.jpg")

// 배경이바뀌는시간을쓰시오
var swapspeed=2

// 아래는코드요 건드리지마시오
var timer
var imgpreload=new Array()
if (document.all) {
for (i=0;i<=backgroundimage.length-1;i++) {
imgpreload[i]=new Image()
imgpreload[i].src=backgroundimage[i]
}
}

var i_backgroundimage=0

swapspeed=swapspeed*1000

function swapimages() {
if (document.all) {
window.status=i_backgroundimage
document.body.background=backgroundimage[i_backgroundimage]
i_backgroundimage++
if (i_backgroundimage>=backgroundimage.length) {i_backgroundimage=0}
timer=setTimeout("swapimages()",swapspeed)
}
}
window.onload=swapimages

</SCRIPT>
Posted by 알 수 없는 사용자
,
  1. <html>
  2. <head>
  3. <SCRIPT language="JavaScript">
  4. var oldtext
  5. var newtext
  6. var newlink
  7. function shownewtext(thislink,thistext) {
  8. if (document.all) {
  9.     newlink=eval("document.getElementById('"+thislink+"')")
  10.     newtext=thistext
  11.     oldtext=newlink.childNodes[0].nodeValue
  12.     newlink.childNodes[0].nodeValue=thistext;
  13. }
  14. }
  15. function showoldtext() {
  16. if (document.all) {
  17.     newlink.childNodes[0].nodeValue=oldtext;
  18. }
  19. }
  20. </script>
  21. </head>
  22. <body>
  23. <a href="#" name="somelinkname" onMouseOver="shownewtext(this.name,'태그피아로!')" onMouseOut="showoldtext()">oxtag.com</a>
  24. </body>
  25. </html>
Posted by 알 수 없는 사용자
,
if(window.navigator.appName=="Microsoft Internet Explorer" && window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE")+5,window.navigator.appVersion.indexOf("MSIE")+8)>=5.5){
 window.location="http://oxtag.com";
 }else {
  window.location="http://oxtag.com/html/marquee.html";
  }
Posted by 알 수 없는 사용자
,

간단한 공지

인터넷관련 2008. 2. 1. 09:43
<HTML>
<HEAD>
<TITLE>
타이틀
</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--

function correct(){
        if (finished){
                setTimeout("begin()",5000)
        }
        return true
}

window.onerror=correct

function begin(){
        if (!document.all) return
        if (maxheight==null) maxheight=temp.offsetHeight
        whatsnew.style.height=maxheight
        temp.style.display="none"
        c=1
        finished=true
        change()
}

// -->
</SCRIPT>
</HEAD>
<BODY onload="begin();">

<script language="javascript">
<!--
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var head=''
var top=0
var maxheight
var finished=false
var tickers=new Array()

        tickers[0]=' <a href=""><font size=2 face=굴림 color=#4B4BCC>초스피드 업데이트! 신문에 소개된 모든 URL이 한자리에...</font></a> '
        tickers[1]=' <a href=""><font size=2 face=굴림 color=#4B4BCC>왕건, 여인천하, 홍국영, 명성황후. 드라마보기</font>'
        tickers[2]=' <a href=""><font size=2 face=굴림 color=#4B4BCC>올 여름 휴가, 어디로 떠나세요? 휴양림을 추천합니다</font>'
       
       
       
       
       
        
if (bName == "Microsoft Internet Explorer" && bVer >= 4) {

        for (i=1;i<=tickers.length-1;i++){
                if (tickers[i].length>=tickers[top].length)
                        top=i
        }
        if (document.all) document.write('<span id="whatsnew" style="width:100%;height=10;filter:revealTrans(duration=2,transition=19)">'+tickers[0]+'</span>')

        function change(){
                whatsnew.innerHTML=''
                whatsnew.filters.revealTrans.apply()
                whatsnew.filters.revealTrans.play()
                whatsnew.innerHTML=tickers[c]
                if (c==tickers.length-1)
                        c=0
                else
                        c+=1
                setTimeout("change()",5000)
        }
        if (document.all)
                document.write('<span id=ns style="display:none;">')
}
else {
        document.write(tickers[0])
}
//-->
</script>
<span id=temp style="position:absolute;left:0;top:0">
<script>
<!--
if (document.all){
temp.style.width=whatsnew.style.width
document.write(tickers[top])
}
//-->
</script>
</span>
</BODY>
</HTML>
Posted by 알 수 없는 사용자
,
<html>
<head>
<title></title>
</head>
<script>
function c(){
if (!document.all)
return
if (pe.style.borderColor=="orange")//기본색을 적어줍니다.
pe.style.borderColor="darkblue" //바뀔색을적어줍니다.
else
pe.style.borderColor="orange" //기본색과 같이적어줍니다.
}
function d(){
if (!document.all)
return
if (window.status=="퍼런색") //아래상황바에 나타날글을 씁니다.
window.status="오렌지"//위에거랑 다른글을 씁니다.
else
window.status="퍼런색" //처음이랑 같은글을 써줍니다.
}
setInterval("d()", 500) //바뀌는시간입니다.1초 = 1000 값을 바꿔보세요.
setInterval("c()", 500) //  시간........
</script>
<body id="pe" style="border:4px solid orange"> //스타일부분에 기본색과같은색을 써줍니다.
</body>
</html>
Posted by 알 수 없는 사용자
,
Posted by 알 수 없는 사용자
,
프레임셋
<html>
<head>
<title></title>
</head>
<frameset rows="27,*" border="0">
    <frame src="1.html" name="top" noresize scrolling="no" marginwidth="0"  marginheight="0" border=1>
    <frame src="2.html" name="content" scrolling="auto" marginwidth="0"  marginheight="0" border=1>
</frameset>
</html>

프레임 상단 페이지
<html>
<head>

<script language="javascript1.2">
var texp=27; //기본높이
function expand_top() {
if(texp==58) { //확장높이
   top.document.body.rows = "27,*";  //기본일때 프레임간격
   texp = 27 //기본높이
} else {
   top.document.body.rows = "58,*";  //확장일때 간격
   texp = 58 //확장높이
}
}
</script>
</head>
<body>
<a href='javascript:expand_top();'>페이지확장</a></font>
<br><br>
늘리기!
</body>

</html>


프레임 하단 페이지는
<html>
<body bgcolor="black">
</body>
</html>
Posted by 알 수 없는 사용자
,
프레임셋
<html>
<head>
<title></title>
</head>
<frameset cols="*, 0%" border="0">
    <frame src="1.html" name="top" noresize scrolling="no" marginwidth="0"  marginheight="0" border=1>
    <frame src="2.html" name="content" scrolling="auto" marginwidth="0"  marginheight="0" border=1>
</frameset>
</html>

프레임 좌측 페이지
<html>
<head>
<title></title>
<script language="javascript1.2">
var bexp=0;
function expand_right() {
if (bexp==0) {
   top.document.body.cols = bexp +"*,20%";
   bexp = 1
} else {
   top.document.body.cols = bexp +"*,0%";
   bexp = 0
}
}
</script>
</head>
<body>
<a href='javascript:expand_right();' onfocus="this.blur()" class="tmnu">Show</a>
</body>
</html>

프레임 우측페이지는 적용할 페이지를 사용하세요.
Posted by 알 수 없는 사용자
,
<HTML>
<HEAD>
<TITLE></TITLE>

</HEAD>

<BODY>
<font size=-1 face=돋움>
<form name="suldo">
<select  name="example" onChange="gothere()" size=1>
<option value="none" selected>--- 메뉴 선택 ---</option>    
<option value="http://oxtag.com/html/marquee.html">마퀴태그</option>
    <option value="http://oxtag.com/html/marquee.html">마퀴태그</option>
  </select>  <br>
  <input type="checkbox" name="windowoption" value="ON">체크하면 새창으로 열립니다.</p>
</form>

체크박스를 선택하고 해보시고 그 반대로 체크박스를 선택하지 말고 접속해보세요.

<script language="javascript">
<!--

function gothere(){
var thebox=document.suldo
if (thebox.windowoption.checked){
if (!window.newwindow)
newwindow=window.open("")
newwindow.location=
thebox.example.options[thebox.example.selectedIndex].value
}
else
location=
thebox.example.options[thebox.example.selectedIndex].value
}
//-->
</script>
</font>
</BODY>
</HTML>
Posted by 알 수 없는 사용자
,
  1. <SCRIPT LANGUAGE="JavaScript1.1">
  2. function loadIndividual(form) {
  3.         var gifName = form.individual.options[form.individual.selectedIndex].value
  4.         document.suldo.src = gifName
  5. }
  6. </SCRIPT>
  7. <TABLE BORDER=0>
  8.         <TR>
  9.                 <TD colspan="0">
  10.                 <IMG SRC="img1.gif" NAME="suldo">
  11.                 </TD>
  12.         </TR>
  13.         <TR>
  14. <FORM NAME="selections">
  15.                 <TD>
  16.                 <SELECT NAME="individual" onChange="loadIndividual(this.form)">
  17.                 <OPTION VALUE="img1.gif">첫번째 이미지</OPTION>
  18.                 <OPTION VALUE="img2.jpg">두번재 이미지</OPTION>
  19.                 </SELECT>
  20.                 </TD>
  21.                 <TD>
  22.                 </TD>
  23. </FORM>
  24.         </TR>
  25. </TABLE>
Posted by 알 수 없는 사용자
,
<script language="JavaScript">
picture1 = new Image()
picture1.src = "img1.jpg"

picture11 = new Image()
picture11.src = "img2.jpg"

picture111 = new Image()
picture111.src = "img3.jpg"

picture1111 = new Image()
picture1111.src = "img4.jpg"

picture11111 = new Image()
picture11111.src = "img5.jpg"

function switchImage(imageName) {
  mousePosition = document.Iform.Ihide.value
  if (mousePosition == "11111") {
    var mousePosition = 0
  }
  
  mousePosition = mousePosition + 1
  imgToAlter = eval(imageName + mousePosition + ".src");
   document.images[imageName].src = imgToAlter;
  document.Iform.Ihide.value = mousePosition
  
}
</script>

<form name="Iform" method="get">
<input type=hidden name="Ihide">
<img src="img6.jpg" width="178" height="270" border="0" name="picture">
<input type="button" value="Change Image" onclick="switchImage('picture')">
</form>
Posted by 알 수 없는 사용자
,
새창뛰우는 창의헤드부분에 삽입.(본페이지)
<script language="javascript">
//쿠키값을 가져오는 함수
function getCookie(name) {
   var from_idx = document.cookie.indexOf(name+'=');
   if (from_idx != -1) {
      from_idx += name.length + 1
      to_idx = document.cookie.indexOf(';', from_idx)

      if (to_idx == -1) {
            to_idx = document.cookie.length
      }
      return unescape(document.cookie.substring(from_idx, to_idx))
   }
}

//getCookie 함수를 호출하여 쿠키값을 가져온다.
var blnCookie = getCookie("member_gender");
//쿠키값이 true가 아닐 경우에만 새 창을 띄운다.
if ( !blnCookie ) {
   window.open('cook.html','_blink','width=225,height=250,scrollbars=no,toolbar=no,left=0,top=0');                
}
</script>
---------여기까지------

새창에 들어갈 소스(cook.html)
<html>

<head>

<script language="javascript">
//쿠키 생성 함수
function setCookie(name, value, expire) {
    var expire_date = new Date(expire)
    document.cookie = name + "=" + escape(value) + "; expires=" + expire_date.toGMTString();
}

//쿠키 소멸 함수
function clearCookie(name) {
    var today = new Date()
    //어제 날짜를 쿠키 소멸 날짜로 설정한다.
    var expire_date = new Date(today.getTime() - 60*60*24*1000)
    document.cookie = name + "= " + "; expires=" + expire_date.toGMTString()
}

//체크 상태에 따라 쿠키 생성과 소멸을 제어하는 함수
function controlCookie(elemnt) {
        if (elemnt.checked) {
                //체크 박스를 선택했을 경우 쿠키 생성 함수 호출
                setCookie("member_gender","true","July 18, 2010 00:00:00")
                //setTimeout("self.close()");
        }
        else {
                //체크 박스를 해제했을 경우 쿠키 소멸 함수 호출
                clearCookie("member_gender")
        }
        return
}
</script>

</head>

<body>
<p>
<form>
<A onclick="javascript:document.all.closeEvent.checked=true;closeWin();window.opener.document.location.href='event.html';" href="#None">
<IMG src="event.gif" border=0>
</A>
<input type="checkbox" name="closeEvent" onClick="controlCookie(this)">다시는 이창 열지 않기    
<input type="button" value="닫기" onclick='self.close();'><br>
</form>

</body>

</html>

-----여기까지
Posted by 알 수 없는 사용자
,
http://oxtag.com/html/ex/ex/ex8.html

  1. <html>
  2. <head>
  3. <title>이미지에 섬광 효과 주기</title>
  4. <style><!--
  5. #spotlight {filter:light}
  6. --></style>
  7. <meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
  8. </head>
  9. <body>
  10. <p align="center"><font color="red" size="2"><b>이미지에 섬광 효과 주기</b></font><P><span
  11. style="font-size:9pt;"><IMG height=30 src="http://oxtag.com/html/img/banner/jjin_tagpia.gif" width=90> 스크립트 적용 전</span></P>
  12. <P><span style="font-size:9pt;"><IMG id=spotlight height=30 src="http://oxtag.com/html/img/banner/jjin_tagpia.gif" width=90 speed="50"> 스크립트 적용
  13. </span></P>
  14. <P><span style="font-size:9pt;">마치 어두운 밤에 여기저기 손전등을 비추는 듯, 평범한 이미지에 섬광효과를 줍니다.</span></P>
  15. <p class="tip-dot-line-table"><span style="font-size:9pt;">&nbsp;</span></p>
  16. <P><span style="font-size:9pt;">&lt;head&gt;&lt;/head&gt; 아래 소스를 넣어 줍니다.</span></P>
  17. <P><span style="font-size:9pt;">&nbsp;</span></P>
  18. <P><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;">&lt;style&gt;&lt;!--</span></FONT></P>
  19. <P><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;">#spotlight {filter:light}</span></FONT></P>
  20. <P><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;">--&gt;&lt;/style&gt;</span></FONT></P>
  21. <p class="tip-dot-line-table"><span style="font-size:9pt;">&nbsp;</span></p>
  22. <P><span style="font-size:9pt;">&lt;body&gt;&lt;/body&gt; 사이에 아래와 같은 식으로 이미지 태그 안에 <b>id=&quot;spotlight&quot;
  23. speed=&quot;50&quot;</b> 를 추가합니다.</span></P>
  24. <P><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;">&lt;img<B> id=</B>&quot;<B>spotlight</B>&quot;<B>
  25. speed=</B>&quot;<B>50</B>&quot; src=&quot;</FONT><font color="blue">http://oxtag.com/html/img/banner/jjin_tagpia.gif</font><FONT class=tip-tag-font color="blue">&quot;&gt;</span></FONT></P>
  26. <P><span style="font-size:9pt;">50 은 속도. 큰 수일수록 속도 느림</span></P>
  27. <p class="tip-dot-line-table"><span style="font-size:9pt;">&nbsp;</span></p>
  28. <P><B><span style="font-size:9pt;">&lt;/body&gt; 바로 앞</B>에 아래 소스를 넣어 줍니다.</span></P>
  29. <P><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;">&lt;script language=&quot;JavaScript1.2&quot;&gt;</span></FONT></P>
  30. <P><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;">/*<BR>Moving light on image script<BR>?Dynamic Drive
  31. (www.dynamicdrive.com)<BR>For full source code, installation
  32. instructions,<BR>100's more DHTML scripts, and Terms Of<BR>Use, visit
  33. dynamicdrive.com<BR>*/</span></FONT></P>
  34. <P><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;"><BR>if
  35. (document.all&amp;&amp;window.spotlight){<BR>var x=new Array()<BR>var
  36. direction=new Array()<BR>var y=new Array()<BR>if
  37. (spotlight.length==null){<BR>spotlight[0]=document.all.spotlight<BR>x[0]=0<BR>direction[0]=&quot;right&quot;<BR>y[0]=spotlight[0].height<BR>spotlight[0].filters.light.addPoint(100,50,100,255,255,255,90)<BR>}<BR>else<BR>for
  38. (i=0;i&lt;spotlight.length;i++){<BR>x[i]=0<BR>direction[i]=&quot;right&quot;<BR>y[i]=spotlight[i].height<BR>spotlight[i].filters.light.addPoint(100,50,100,255,255,255,90)<BR>}<BR>}</span></FONT></P>
  39. <P><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;">function
  40. slidelight(cur){<BR>spotlight[cur].filters.light.MoveLight(0,x[cur],y[cur],200,-1)</span></FONT></P>
  41. <P><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;">if
  42. (x[cur]&lt;spotlight[cur].width+200&amp;&amp;direction[cur]==&quot;right&quot;)<BR>x[cur]+=10<BR>else
  43. if
  44. (x[cur]&gt;spotlight[cur].width+200){<BR>direction[cur]=&quot;left&quot;<BR>x[cur]-=10<BR>}<BR>else
  45. if
  46. (x[cur]&gt;-200&amp;&amp;x[cur]&lt;-185){<BR>direction[cur]=&quot;right&quot;<BR>x[cur]+=10<BR>}<BR>else{<BR>x[cur]-=10<BR>direction[cur]=&quot;left&quot;<BR>}<BR>}</span></FONT></P>
  47. <P><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;">if (document.all&amp;&amp;window.spotlight){<BR>if
  48. (spotlight.length==null)<BR>setInterval(&quot;slidelight(0)&quot;,spotlight[0].speed)<BR>else<BR>for
  49. (t=0;t&lt;spotlight.length;t++){<BR>var
  50. temp='setInterval(&quot;slidelight('+t+')&quot;,'+spotlight[t].speed+')'<BR>eval(temp)<BR>}<BR>}<BR>&lt;/script&gt;</span></FONT></P>
  51. <p><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;">&nbsp;</span></FONT></p>
  52. <p><FONT class=tip-tag-font color="blue"><span style="font-size:9pt;">&nbsp;</span></FONT></p>
  53. <script language="JavaScript1.2">
  54. /*
  55. Moving light on image script
  56. ?Dynamic Drive (www.dynamicdrive.com)
  57. For full source code, installation instructions,
  58. 100's more DHTML scripts, and Terms Of
  59. Use, visit dynamicdrive.com
  60. */
  61. if (document.all&&window.spotlight){
  62. var x=new Array()
  63. var direction=new Array()
  64. var y=new Array()
  65. if (spotlight.length==null){
  66. spotlight[0]=document.all.spotlight
  67. x[0]=0
  68. direction[0]="right"
  69. y[0]=spotlight[0].height
  70. spotlight[0].filters.light.addPoint(100,50,100,255,255,255,90)
  71. }
  72. else
  73. for (i=0;i<spotlight.length;i++){
  74. x[i]=0
  75. direction[i]="right"
  76. y[i]=spotlight[i].height
  77. spotlight[i].filters.light.addPoint(100,50,100,255,255,255,90)
  78. }
  79. }
  80. function slidelight(cur){
  81. spotlight[cur].filters.light.MoveLight(0,x[cur],y[cur],200,-1)
  82. if (x[cur]<spotlight[cur].width+200&&direction[cur]=="right")
  83. x[cur]+=10
  84. else if (x[cur]>spotlight[cur].width+200){
  85. direction[cur]="left"
  86. x[cur]-=10
  87. }
  88. else if (x[cur]>-200&&x[cur]<-185){
  89. direction[cur]="right"
  90. x[cur]+=10
  91. }
  92. else{
  93. x[cur]-=10
  94. direction[cur]="left"
  95. }
  96. }
  97. if (document.all&&window.spotlight){
  98. if (spotlight.length==null)
  99. setInterval("slidelight(0)",spotlight[0].speed)
  100. else
  101. for (t=0;t<spotlight.length;t++){
  102. var temp='setInterval("slidelight('+t+')",'+spotlight[t].speed+')'
  103. eval(temp)
  104. }
  105. }
  106. </script>
  107. </body>
  108. </html>
Posted by 알 수 없는 사용자
,
자바스크립트와 테이터베이스 연동 [1]

http://oxtag.com/html/ex/JS_DataBase/js_db1.html


  1. <html>
  2. <head></head>
  3. <body>
  4. <OBJECT id="mydata" width=0 height=0 classid="CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83">
  5.         <PARAM name="FieldDelim" value="|">
  6.         <PARAM name="TextQualifier" value="">
  7.         <PARAM name="DataURL" value="data.txt">
  8.         <PARAM name="UseHeader" value="true">
  9. </OBJECT>
  10. <FORM>
  11.         <INPUT type=button value="<<" onClick="mytable.previousPage()">
  12.         <INPUT type=button value=">>" onClick="mytable.nextPage()">
  13. </FORM>
  14. <TABLE datasrc=#mydata border=1 width=100% datapagesize=1 id="mytable">
  15.         <THEAD>
  16.         <TR>
  17.                 <TD width=100><SPAN id=chapter></SPAN></TD>
  18.                 <TD width=100><SPAN id=num>번호</SPAN></TD>
  19.                 <TD><SPAN id=mytitle>제목</SPAN></TD>
  20.         </TR>
  21.         </THEAD>
  22.         <TBODY>
  23.         <TR>
  24.                 <TD><SPAN datafld="chapter"></SPAN></TD>
  25.                 <TD><SPAN datafld="num"></SPAN></TD>
  26.                 <TD><A datafld="src"><SPAN datafld="title"></SPAN></A></TD>
  27.         </TR>
  28.         </TBODY>
  29. </TABLE>
  30. </body>
  31. </html>




자바스크립트와테이터베이스연동 [2]

http://oxtag.com/html/ex/JS_DataBase/js_db2.html
  1. <html>
  2. <head></head>
  3. <body>
  4. <OBJECT id="mydata" width=0 height=0 classid="CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83">
  5.         <PARAM name="FieldDelim" value="|">
  6.         <PARAM name="TextQualifier" value="">
  7.         <PARAM name="DataURL" value="data.txt">
  8.         <PARAM name="UseHeader" value="true">
  9. </OBJECT>
  10. <FORM>
  11.         <SELECT id="mySelection" onChange="doitnow()">
  12.                 <OPTION value="all"> 모두 보기
  13.                 <OPTION value="chapter1"> chapter 1
  14.                 <OPTION value="chapter2"> chapter 2
  15.                 <OPTION value="chapter3"> chapter 3
  16.                 <OPTION value="chapter4"> chapter 4
  17.         </SELECT>
  18. </FORM>
  19. <TABLE datasrc=#mydata border=1 width=100%>
  20.         <THEAD>
  21.         <TR>
  22.                 <TD width=100><SPAN id=chapter></SPAN></TD>
  23.                 <TD width=100><SPAN id=num>번호</SPAN></TD>
  24.                 <TD><SPAN id=mytitle>제목</SPAN></TD>
  25.         </TR>
  26.         </THEAD>
  27.         <TBODY>
  28.         <TR>
  29.                 <TD><SPAN datafld="chapter"></SPAN></TD>
  30.                 <TD><SPAN datafld="num"></SPAN></TD>
  31.                 <TD><A datafld="src"><SPAN datafld="title"></SPAN></A></TD>
  32.         </TR>
  33.         </TBODY>
  34. </TABLE>
  35. <SCRIPT>
  36.         function doitnow() {
  37.                 if(document.all.mySelection.selectedIndex==0) {
  38.                         mydata.FilterColumn = "";
  39.                         mydata.FilterValue == "";
  40.                 }
  41.                 else {
  42.                         mydata.FilterColumn = "chapter";
  43.                              mydata.FilterCriterion = "=";
  44.                      mydata.FilterValue =
  45.                                 document.all.mySelection[document.all.mySelection.selectedIndex].value ;
  46.                 }
  47.                 mydata.reset();
  48.         }
  49.         mydata.recordset.moveFirst();
  50. </SCRIPT>
  51. </body>
  52. </html>



    ---------------------------------------------------------------

    data.txt 내용

    title|chapter|num|src
    간단한 HTML 문서|chapter1|exnum1-1|exnumle1-1.html
    META 요소의 활용|chapter2|exnum2-1|exnumple2-1.html
    TITLE 요소의 의미|chapter2|exnum2-2|exnumple2-2.html
    BASE 요소의 활용|chapter2|exnum2-3|exnumple2-3.html
    블럭요소의 활용|chapter3|exnum3-1|exnumple3-1.html
    PRE요소의 활용|chapter3|exnum3-2|exnumple3-2.html
    모양지정 인라인요소|chapter3|exnum3-3|exnumple3-3.html
    의미지정 인라인요소|chapter3|exnum3-4|exnumple3-4.html  
    BR, NOBR, WBR 요소|chapter3|exnum3-5|exnumple3-5.html
    객체요소(IMG,EMBED)|chapter3|exnum3-6|exnumple3-6.html
    TABLE 관련 요소|chapter4|exnum4-1|exnumple4-1.html
    FRAME 관련 요소와 속성|chapter4|exnum4-2|exnumple4-2.html


Posted by 알 수 없는 사용자
,
http://oxtag.com/html/ex/ex/ex6.html

  1. <SCRIPT LANGUAGE="JavaScript">
  2. <!--
  3. delay=300        // 이미지가 바뀌는 시간 1000 = 1초, 이미지대신 스타일시트를 이용하면 무지 버벅이겠죠...ㅋ
  4. num = 1        // 파일 시작 번호.
  5. my_img = new Array()
  6. for(i=1;i<=8;i++) {
  7.     my_img[i] = new Image()
  8.     my_img[i].src = "http://oxtag.com/html/img/fish/fish_"+i+".gif"
  9. }
  10. function ani() {
  11.      ani_img.src = my_img[num].src
  12.      ani_loop = setTimeout('ani()',delay)
  13.          num = num + 1
  14.          if (num > 8) num = 1
  15. }
  16. function ani_stop() {
  17.     clearTimeout(ani_loop)
  18. }
  19. //-->
  20. </SCRIPT>
  21. </HEAD>
  22. <BODY>
  23. <!--
  24. 문서가 로드 되었을때 실행시킬경우
  25. <BODY onload=ani()>
  26. -->
  27. <center>
  28. <img src='http://oxtag.com/html/img/fish/fish_1.gif' name='ani_img' width=50 height=30>
  29. <p>
  30. <button style="border:1 solid #add8e6;background-color:white;" onClick="ani()" >animation start</button>
  31. <button style="border:1 solid #add8e6;background-color:white;" onClick="ani_stop()">animation stop</button>
  32. </center>
Posted by 알 수 없는 사용자
,
<script>
function formatCurrency(arg){
n=String(arg)
//소수점 파싱 시작
o=n.split(".")[0]
p=n.split(".")[1]
//파싱 끝
n=""
//사용자가 임의로 넣은 콤마(,)제거
while(o.indexOf(",")!=-1){
        o=o.replace(",","")
        }
//제거 끝
//소수점 이상 부분 변환
d=o.length%3
for(i=0;i<o.length;i++){
        if(i%3==d){
                n+=","
                }
        n+=o.charAt(i)
        }
if(!d){n=n.replace(n.charAt(0),"")}
//변환 끝
//"소수점 이하가 있다면"조건부 시작
if(p){n+="."+p}
//조건부 끝
return n
}

function myFunction(obj){
obj.oldValue=obj.value
obj.value=formatCurrency(obj.value)
obj.dir="rtl"
}
function myFunction2(obj){
if(obj.oldValue){
obj.value=obj.oldValue
}
obj.select()
obj.dir="ltr"
}
</script>
<style>
input{border:solid 1px black}
</style>
<body>
<input type=text dir="rtl" onfocus="myFunction2(this)" onblur="myFunction(this)"><br>
<input type=text dir="rtl" onfocus="myFunction2(this)" onblur="myFunction(this)"><br>
<input type=text dir="rtl" onfocus="myFunction2(this)" onblur="myFunction(this)"><br>
<input type=text dir="rtl" onfocus="myFunction2(this)" onblur="myFunction(this)"><br>
vbscript에는 FormatCurrency()라는 자체 내장 함수가 있습니다<br>
javascript에는 위와 같은 함수가 없기때문에 넷스케잎과의 호환을 위해<br>
formatCurrency()라는 함수를 만들어 사용했습니다<br>
저는 엑셀 워크쉬트처럼 보이게 만들었는데 맘에 들지 모르겠네요<br>
<input type=text>엘리먼트의 어트리뷰트중 dir(direction의 약자같죠?)의 속성은<br>
ltr(left to right)과 rtl(right to left)이 있습니다<br>
테스트는 ie5.5 와 nn6(6.01)에서 했습니다
</body>

-[김형진님제공]
Posted by 알 수 없는 사용자
,
  1. <html>
  2. <head>
  3. <TITLE>animation for all links</TITLE>
  4. <script>
  5. <!-- JavaScript 시작 -
  6. var x,y
  7. var timer
  8. var i_fontsize=0
  9. var step=0
  10. var thisx,thisy
  11. function ringup() {
  12.         if (document.all) {
  13.                 thisx = x
  14.                 thisy = y
  15.                 ringup2()
  16.         }
  17. }
  18. function ringup2() {
  19.         if (i_fontsize<=1530) {        
  20.                 document.all.ring.style.fontSize=i_fontsize
  21.                 document.all.ring.style.color="gray"
  22.             document.all.ring.style.posLeft=thisx-(Math.floor(i_fontsize/3))
  23.                 document.all.ring.style.posTop=thisy-(Math.floor(i_fontsize/1.4))        
  24.                 step+=4
  25.                 i_fontsize+=step
  26.                 timer=setTimeout("ringup(2)",300)
  27.         }
  28.         else {
  29.                 clearTimeout(timer)
  30.                 i_fontsize=0
  31.                 step=0
  32.                 document.all.ring.style.posTop=-10000
  33.         }
  34. }
  35. function handlerMM(e){
  36.         x = (document.layers) ? e.pageX : event.clientX
  37.         y = (document.layers) ? e.pageY : event.clientY
  38. }
  39. document.onmousemove = handlerMM;
  40. // - JavaScript 끝- -->
  41. </script>
  42. <STYLE>
  43. .ringstyle {
  44.         position:absolute;
  45.         visibility:visible;
  46.         top:-50px;
  47.         font-size:5pt;
  48.         font-family:Verdana;
  49.         color:GREEN
  50. }
  51. .explain {
  52.         position:absolute;
  53.         top:80px;
  54.         left:40px;
  55.         width:480px;
  56.         color:GREEN;
  57.         text-align:center;
  58.         font-size:10pt;
  59.         font-family:Times;
  60. }
  61. A { font-family: Times;
  62.         color: GREEN;
  63.         text-decoration:underline
  64. }
  65. A:visited {
  66.         color: GREEN;
  67. }
  68. </STYLE>
  69. </HEAD>
  70. <body bgcolor="#000000" SCROLL=NO>
  71. Internet Explorer 4.x이상
  72. <DIV id="ring" class="ringstyle">OXTAG.COM</DIV>
  73. <DIV id="redirection" class="explain"><p> <body onload="javascript:for(i=1;i<30;i++){ringup();}"><p></DIV>
  74. </body>
  75. </html>
Posted by 알 수 없는 사용자
,
웹페이지 대화상자로 부모창의 최상위에 새창이 항상 존재한다.
익스플로러 전용이구여 익스플로러 4.0 이상에서만 지원합니다.

showModalDialog와 showModelessDialog 두가지를 사용합니다.

showModalDialog
창이 떠있는한 부모창을 선택할수없다. 항상 최상위에 존재한다.

showModelessDialog
창이 떠있어도 부모창을 선택 가능하고 한 부모창에 여러개의 showModelessDialog창이 존재할수있다.
부모창을 클릭하더라도 선택은 되지만 항상 최상위에 존재한다.


로딩시 자동으로 새창 띄우기
<script language="JavaScript">
// showModalDialog 사용시
window.showModalDialog("경로","이름","옵션");
// showModelessDialog 사용시
// window.showModelessDialog("경로","이름","옵션");
</script>

마우스 클릭으로 새창 띄우기
<a onclick="JavaScript:window.showModalDialog('경로','이름','옵션');">새창테스트</a>
<a onclick="JavaScript:window.showModelessDialog('경로','이름','옵션');">새창테스트</a>

옵션을 미리 선언하고 띄우기
<SCRIPT>
function OpenDialog(){
        var Features="dialogHeight: 500px; dialogWidth: 600px; center: yes; help: no; resizable: yes; status: yes;";
        window.showModalDialog("http://oxtag.com",  "NewDialog", Features);
        // window.showModelessDialog("http://oxtag.com",  "NewDialog", Features);
}
</SCRIPT>
<a href="#None" onClick="OpenDialog()">showModalDialog Method</a>


옵션 예제
"dialogWidth:202px;dialogHeight:168px;dialogLeft:200px;dialogTop:200px;status:no;help:no;scroll:no;"


옵션 설명

세로 길이
dialogHeight:sHeight Sets the height of the dialog window (see Remarks for default unit of measure).

가로 길이
dialogWidth:sWidth Sets the width of the dialog window (see Remarks for default unit of measure).

창의 왼쪽에서 떨어지는 위치
dialogLeft:sXPos Sets the left position of the dialog window relative to the upper-left corner of the desktop.

창의 상단에서 떨어지는 위치
dialogTop:sYPos Sets the top position of the dialog window relative to the upper-left corner of the desktop.

창의 중앙 위치 여부 - 기본값 Yes
center:{ yes | no | 1 | 0 | on | off } Specifies whether to center the dialog window within the desktop. The default is yes.

인쇄나 미리보기시 표시 여부 - 기본값 No
dialogHide:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window is hidden when printing or using print preview. This feature is only available when a dialog box is opened from a trusted application. The default is no.

안쪽 공간 여부 (sunken=있음, raised=없음) - 기본 값 raised
edge:{ sunken | raised } Specifies the edge style of the dialog window. The default is raised.

도움말표시 여부 - 기본 값 Yes
help:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays the context-sensitive Help icon. The default is yes.

창 넓이 조정 여부 - 기본 값 No
resizable:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window has fixed dimensions. The default is no.

스크롤바 여부 - 기본 값 Yes
scroll:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays scrollbars. The default is yes.

상태표시줄 여부 - 기본 값 Yes
status:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays a status bar. The default is yes for untrusted dialog windows and no for trusted dialog windows.

창틀 여부 - 기본 값 No (웹브라우져에선 적용안됨.)
unadorned:{ yes | no | 1 | 0 | on | off } Specifies whether the dialog window displays the border window chrome. This feature is only available when a dialog box is opened from a trusted application. The default is no.
Posted by 알 수 없는 사용자
,
  1. <FORM name='ff2' METHOD=POST ACTION="">
  2. <SELECT NAME="ss1" size=1 onChange='init_list("ff2","ss1","ss2","ss3",1)'>
  3.     <option value='0'>대분류</option>
  4. </SELECT>
  5. <SELECT NAME="ss2" size=1 onChange='init_list("ff2","ss1","ss2","ss3",2)'>
  6.     <option >중분류</option>
  7. </SELECT>
  8. <SELECT NAME="ss3" size=1>
  9.     <option >소분류</option>
  10. </SELECT>
  11. </FORM>
  12. <SCRIPT LANGUAGE="JavaScript">
  13. <!--
  14. /////////////////////////////// 대분류 배열
  15. //    Ccode = new Array();
  16. //    Cname = new Array();
  17.     Ccode = ["0","11","12"]
  18.     Cname = ["대분류","비지니스/경제","컴퓨터/인터넷"]
  19. ////////////////////////////// 중분류 배열    
  20.     Ccode11 = ["0","1111","1112","1113"]
  21.     Cname11 = ["중분류","경제1","경제2","경제3"]
  22.     Cflag11 = ["0","0","1","1"]
  23.     Ccode12 = ["0","1211","1212","1213"]
  24.     Cname12 = ["중분류","운영체제","컴퓨터활용","소프트웨어"]
  25. ///////////////////////////// 소분류 배열
  26.     Ccode1111 = ["0","111111","111112","111113"]
  27.     Cname1111 = ["소분류","경제소1","경제소2","경제소3"]
  28.     Ccode1112 = ["0","111111","111112","111113"]
  29.     Cname1112 = ["소분류","경제소221","경제소222","경제소223"]
  30.     Ccode1211 = ["0","111111","111112","111113"]
  31.     Cname1211 = ["소분류","윈도우소1","리눅스소2","유닉스소3"]
  32.     Ccode1212 = ["0","111111","111112","111113"]
  33.     Cname1212 = ["소분류","윈도우소2221","리눅스소2222","유닉스2223"]
  34. //////////////////////////////////////////////
  35. // ff - 폼이름
  36. // ss1 - 대분류 셀렉트박스 이름
  37. // ss2 - 중분류 셀렉트박스 이름
  38. // ss3 - 소분류 셀렉트박스 이름
  39. // gubun - 대분류에서 온 값인지 소분류에서 온 값인지 여부
  40. ////////////////////////////////////////////////
  41. function init_list(Pform,Pss1,Pss2,Pss3,gubun) {
  42. FS1 = eval(Pform + "." + Pss1)
  43. FS2 = eval(Pform + "." + Pss2)
  44. FS3 = eval(Pform + "." + Pss3)
  45. switch(gubun) {
  46.     case 1 :
  47. // 대분류값이 변하였을 경우
  48.      if(FS1.options[FS1.selectedIndex].value != 0 ) {
  49.         MCcode = eval( "Ccode" + FS1.options[FS1.selectedIndex].value )
  50.         MCname = eval( "Cname" + FS1.options[FS1.selectedIndex].value )
  51.         FS2.options.length = Ccode.length
  52.         for(i=0 ; i < Ccode.length ; i++) {
  53.          FS2.options[i].value = MCcode[i]
  54.          FS2.options[i].text = MCname[i]
  55.         }
  56.      } else {
  57.          FS2.options.length = 1
  58.          FS2.options[0].value = "0"
  59.          FS2.options[0].text = "중분류"
  60.      }
  61.      break ;
  62.     case 2 :
  63. // 중분류값이 변하였을 경우
  64.      if(FS2.options[FS2.selectedIndex].value != 0 ) {
  65.         SCcode = eval( "Ccode" + FS2.options[FS2.selectedIndex].value )
  66.         SCname = eval( "Cname" + FS2.options[FS2.selectedIndex].value )
  67.         FS3.options.length = Ccode.length
  68.         for(i=0 ; i < Ccode.length ; i++) {
  69.          FS3.options[i].value = SCcode[i]
  70.          FS3.options[i].text = SCname[i]
  71.         }
  72.      } else {
  73.          FS3.options.length = 1
  74.          FS3.options[0].value = "0"
  75.          FS3.options[0].text = "소분류"        
  76.      }
  77.      break ;
  78.     default :
  79. // 초기화 기본값
  80.          FS1.options.length = Ccode.length
  81.          for(i=0 ; i < Ccode.length ; i++) {
  82.             FS1.options[i].value = Ccode[i]
  83.             FS1.options[i].text = Cname[i]
  84.          }
  85.      break ;
  86.     }
  87. }
  88. init_list("ff2","ss1","ss2","ss3",0) ;
  89. //-->
  90. </SCRIPT>
Posted by 알 수 없는 사용자
,
http://oxtag.com/html/ex/ex/ex7.html

  1. <SCRIPT LANGUAGE="JavaScript">
  2. <!--
  3. function move_focus() {
  4. len = form1.pos1.value.length
  5. aa = String.fromCharCode(event.keyCode)
  6. if(len == 2) {
  7.         form1.pos1.value = form1.pos1.value + aa ;
  8.         form1.pos2.focus() ;
  9. }
  10. }
  11. function enter_move() {
  12. if(event.keyCode == 13) {
  13.     form1.nn2.focus()
  14. }
  15. }
  16. //-->
  17. </SCRIPT>
  18. </HEAD>
  19. <BODY>
  20. <form name=form1>
  21.     ○ 3글자를 넣으면 포커스가 이동합니다. <br>
  22.     우편번호 : <input type=text name=pos1 onKeypress='move_focus("form1.pos1")'> - <input type=text name=pos2 onfocus="this.value=''" ><p>
  23.         ○ 엔터를 치면 포커스가 이동합니다.<br>
  24.         name    : <input type=text name=nn onKeypress='enter_move()'><br>
  25.         별명     : <input type=text name=nn2>
  26. </form>
  27. <br>
  28. ○ 텍스트 박스 내의 글자 길이 제한 체크 <p>
  29. <SCRIPT LANGUAGE="JavaScript">
  30. <!--
  31. function MsgLenCheck(f) {
  32.     MsgLen = getStrLen(f.value)
  33.          ShowMsgLen.innerHTML = MsgLen + '/20';
  34.         
  35.         if (MsgLen > 20 )
  36.         {
  37.                 alert(" 20 byte 이상은 저장되지 않습니다. ")
  38.         }
  39. }
  40. function getStrLen(str)
  41. {
  42.         var len=0, j;
  43.         
  44.         for (i=0, j=str.length;        i < j ; i++, len++)
  45.         {
  46.                 if ( (str.charCodeAt(i)<0)||(str.charCodeAt(i)>127) )
  47.                 {
  48.                         len = len+1;
  49.                 }
  50.         }
  51.         return len;
  52. }
  53. //-->
  54. </SCRIPT>
  55. <div id='ShowMsgLen' name='ShowMsgLen'> 0 / 20 </div> <p>
  56. <textarea name=content rows=10 cols=80 onkeyup="MsgLenCheck(this)" style="font-size:9pt;"></textarea>
Posted by 알 수 없는 사용자
,
http://oxtag.com/html/ex/ex/ex3.html

  1. <SCRIPT LANGUAGE="JavaScript">
  2. <!--
  3. function hoho() {
  4. Sdate = new Date()
  5. Syy = ff.yy.options[ff.yy.selectedIndex].value ;
  6. Smm = parseInt( ff.mm.options[ff.mm.selectedIndex].value ) + 1 ;
  7. Sdate.setFullYear(Syy,Smm,0) ;
  8. Endcount = Sdate.getDate() ;
  9. // 지정된 실렉트박스의 옵션 갯수를 변경할 경우...
  10. ff.dd.options.length = Endcount
  11. for(i=0 ; i < Endcount ; i++) {
  12.     ii = i + 1
  13.     ff.dd.options[i].text = ii
  14.     ff.dd.options[i].value = ii
  15. }
  16. }
  17. //-->
  18. </SCRIPT>
  19. <center>
  20. <br>
  21. 매월 마지막 날짜 구하기 <br><br>
  22. <FORM METHOD=POST ACTION="" name='ff'>
  23. <SELECT NAME="yy" onChange = 'hoho()'>
  24. <option value='2003'> 2003 </option>
  25. <option value='2004'> 2004 </option>
  26. <option value='2005'> 2005 </option>
  27. <option value='2006'> 2006 </option>
  28. <option value='2007'> 2007 </option>
  29. </SELECT>
  30. <SELECT NAME="mm" onChange = 'hoho()'>
  31. <option value='0'> 1 </option>
  32. <option value='1'> 2 </option>
  33. <option value='2'> 3 </option>
  34. <option value='3'> 4 </option>
  35. <option value='4'> 5 </option>
  36. <option value='5'> 6 </option>
  37. <option value='6'> 7 </option>
  38. <option value='7'> 8 </option>
  39. <option value='8'> 9 </option>
  40. <option value='9'> 10 </option>
  41. <option value='10'> 11 </option>
  42. <option value='11'> 12 </option>
  43. </SELECT>
  44. <SELECT NAME="dd" onChange = 'hoho()'>
  45. <option value='1'>1</option>
  46. <option value='2'>2</option>
  47. <option value='3'>3</option>
  48. <option value='4'>4</option>
  49. <option value='5'>5</option>
  50. <option value='6'>6</option>
  51. <option value='7'>7</option>
  52. <option value='8'>8</option>
  53. <option value='9'>9</option>
  54. <option value='10'>10</option>
  55. <option value='11'>11</option>
  56. <option value='12'>12</option>
  57. <option value='13'>13</option>
  58. <option value='14'>14</option>
  59. <option value='15'>15</option>
  60. <option value='16'>16</option>
  61. <option value='17'>17</option>
  62. <option value='18'>18</option>
  63. <option value='19'>19</option>
  64. <option value='20'>20</option>
  65. <option value='21'>21</option>
  66. <option value='22'>22</option>
  67. <option value='23'>23</option>
  68. <option value='24'>24</option>
  69. <option value='25'>25</option>
  70. <option value='26'>26</option>
  71. <option value='27'>27</option>
  72. <option value='28'>28</option>
  73. <option value='29'>29</option>
  74. <option value='30'>30</option>
  75. <option value='31'>31</option>
  76. </SELECT>
  77. </FORM>
Posted by 알 수 없는 사용자
,
1.
아래 스크립트는 iframe에 들어갈 파일을 건드리지않아도 됩니다.
객체에 대한 read/write권한을 위해서 같은 계정내의 파일이기만 하면 됩니다.
<script>
function doResize()
{
container.height = myframe.document.body.scrollHeight;
container.width = myframe.document.body.scrollWidth;
}
</script>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="container"><iframe src="your_file.html" name="myframe" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="no" onload="doResize()"></iframe></td>
</tr>
</table>

iframe에 들어갈 파일의 로딩이 완료되는 순간 doResize() 함수를 호출하여 iframe을 포함하는 TD태그의 width와 height를 강제로 바꿔줍니다.
Windows 2000, IE 6. 에서는 잘 보이는데 다른 환경에서는 어떨런지 모르겠네요 :)

2.
<script Language='javascript'>
function reSize() {
        try{
        var objBody = ifrm.document.body;
        var objFrame = document.all["ifrm"];
        ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
       
        if (ifrmHeight > 300) {
                objFrame.style.height = ifrmHeight
        }else{
                objFrame.style.height = 300;
        }
        objFrame.style.width = '100%'
        }catch(e){}
}
function init_iframe() {
        reSize();
        setTimeout('init_iframe()',200)
}
init_iframe();
</script>
그리고.... 아이프레임은 다음과 같이
id를 지정해주면 됩니다.
<iframe id='ifrm' ........>

3.
<iframe src=1.html name=myframe width=100% marginwidth=0 marginheight=0 frameborder=no></iframe>

iframe에 포함될 1.html 파일은

<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 onload="top.document.all.myframe.height = document.body.scrollHeight">
내용
</body>


4.
<script>
function initsize() {
self.resizeTo(document.body.scrollWidth, document.body.scrollHeight);
}
</script>
<body onLoad="initsize();">

5.
먼저 헤드와 헤드사이에
<script language="JavaScript1.2">
function iframe_reset(){
        dataobj=document.all? document.all.page_content : document.getElementById("page_content")
        
        dataobj.style.top=0
        dataobj.style.left=0

        pagelength=dataobj.offsetHeight
        pagewidth=dataobj.offsetWidth

        parent.document.all.iframe_main.height=pagelength
        parent.document.all.iframe_main.width=pagewidth
}
window.onload=iframe_reset
</script>
이소기를 참가 하세요^^

아이 프레임에...
<iframe id="iframe_main" src="test.html" width=10 height=10 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></iframe>


6.
제일 간단.
iframe 문서에 삽입
<script>
        if(window != top) {
                self.resizeTo(document.body.scrollWidth, document.body.scrollHeight + 10);
        }
</script>
Posted by 알 수 없는 사용자
,
http://oxtag.com/html/ex/ex/ex4.html

  1. <SCRIPT LANGUAGE="JavaScript">
  2. <!--
  3. function allcheck(formname,boxname,bool) {
  4.     form = eval(formname) ;
  5.     flen = form.elements.length ;
  6.     for( i=0 ; i<flen ; i++ ) {
  7.      if(form.elements[i].name == boxname ) {
  8.              form.elements[i].checked = bool ;
  9.          }
  10.         }
  11. }
  12. //-->
  13. </SCRIPT>
  14. <center>
  15. <FORM name = 'ff' METHOD=get ACTION="form.asp" target="_blank">
  16. <INPUT TYPE="checkbox" NAME="arr" value='a1'>a1<br>
  17. <INPUT TYPE="checkbox" NAME="arr" value='a2'>a2<BR>
  18. <INPUT TYPE="checkbox" NAME="arr" value='a3'>a3<BR>
  19. <INPUT TYPE="checkbox" NAME="arr" value='a4'>a4<BR>
  20. <INPUT TYPE="checkbox" NAME="arr" value='a5'>a5<p>
  21. </FORM>
  22. <a href='javascript:allcheck("ff","arr",true)'>모두체크</a> |
  23. <a href='javascript:allcheck("ff","arr",false)'>모두해제</a>
Posted by 알 수 없는 사용자
,

http://oxtag.com/html/ex/ex/ex2.html

<title>마우스 좌표값 - 태그피아</title>
<meta http-equiv="Content-Type" content="text/html; charset=" kr">
<meta name="description" content="Oxtag는 홈페이지 제작용 태그 및 대화방에서 사용될 수 있는 태그와 슬라이딩메뉴, 자바스크립트 예제, 스타일 시트, 각종 무료정보를 제공하고 있습니다.또한 자바스크립트는 디자인관련, 기능관련 예제로 제공하고 있으며 체계적인 태그강의를 통한 초보에서 진정한 태그강자가 될수 있도록 쉽고 자세하게 태그에 대해서 기술하고있습니다.">
<meta name="keywords" content="인코딩, 디코딩, 스크립트 인코딩, 태그연습장, 태그, oxtag, OXTAG, html, tag, TAG, HTML, 자바스크립트, 자바, javascript, java, JAVASCRIPT, JAVA, 스타일시트, stylesheet, STYLESHEET, 슬라이딩 메뉴, sliding menu, SLIDIG MENU무료, 공짜, 대화방태그, 대화방, 홈페이지제작, 예제, 폭, 퍽, 채팅태그, 채팅, homepage, 정보, 대화방태그, 채팅태그, tip, TIP, 등록, 웹디자인, 웹제작, 웹페이지, 초보, 홈페이지">

<script>
var x,y
document.onmousedown = mDown
document.onmousemove = mMove
// document.onmouseup   = mUp


function mDown() {
  x = event.x
  y = event.y
  window.status = "x = "+x+" | y = "+ y
}

function mMove() {
  x = event.x
  y = event.y
  window.status = "x = "+x+" | y = "+ y
}

/*
function mUp() {
  window.status = "aaa"
}
*/
</script>
<center><br><br><br><font style="font-size:8pt;">마우스를 이동해보세요.<br><br>하단 상태바에 좌표값이 나옵니다.</font></center>

Posted by 알 수 없는 사용자
,
관련 페이지
마이크로소프트사 - http://www.microsoft.com/downloads/details.aspx?displaylang=ko&FamilyID=E7877F67-C447-4873-B1B0-21F0626A6329
마이크로소프트사 메뉴얼 - http://oxtag.com/html/ex/Encode_ScriptDecoder/menual/sgCLEOverview.html
태그피아 웹 스크립트 인코더/디코더 - http://oxtag.com/zboard/zboard.php?id=js&no=302
김기수의 ice world - http://ice.pe.kr/ (도스프로그램을 윈도우프로그램으로 수정)

아래 설명은 도스상태나 명령 프로프트 상에서 실행하는 방법입니다.

지금까지 스크립트를 사용했을 때의 단점은 스크립트에 포함되어 있는 지적 소유권을

보호할 수 없다는 것과 작성자가 작성한 스크립트대로 다른 사용자가 이 스크립트를

얻을 수 있는지 확신할 수 없다는 것입니다.

잘 작성된 알고리즘과 심혈을 기울여 디자인한 스크립트는 일반 텍스트 형식으로 저장되므로 쉽게 노출됩니다.

따라서 일반 스크립트 사용자들도 스크립트 디자이너의 코드를 볼 수 있으며 그 코드를

가져와 수정하여 자기 것으로 만들 수 있습니다.

이것은 치열한 경쟁 환경에서 결코 바람직한 일은 아닙니다.

스크립트릿의 도입으로 원본 코드를 보호하는 일이 훨씬 더 중요해졌습니다.

스크립트 디자이너는 이렇게 간단한 구성 요소 아키텍처는 사용하려고 하면서도 자신들의

원본 코드는 다른 사람들과 공유하려고 하지 않습니다.

스크립트를 일단 인코딩하면 인코딩된 파일을 조금만 변경해도 작동하지 않기 때문에

인코딩한 스크립트의 무결성을 완전히 보장할 수 있습니다.


위에 내용은 MS사의 Script Encoder에 대한 개략적인 내용입니다.

먼저 Script Encoder를 다운로드 받아서 설치 하셔야 합니다.

http://oxtag.com/zboard/zboard.php?id=pds2&no=103

기본 경로에 설치된 경우 프로그램 폴더에 설치가 됩니다.

그안에 Windows Script Encoder 라는 폴더가 생기는데 그곳에 도움말이 자세히 나와 있습니다.

그럼 간단한 예로 들어 보겠습니다.

98인 경우로 예를 들겠습니다. xp, 2000인 경우는 프롬프트에서 하면 되겠죠

설치가 완료 되었다면 스크립트 소스가 있는 페이지를 a.htm 이라 가정하고 인코딩으로 변환할

파일을 b.htm이라고 가정 했을때

a.htm(원본 파일) 과 b.htm(인코딩으로 변환될 파일, 소스는 상관없이 아무 파일이면 됩니다.) 을

Windows Script Encoder 폴더에 넣습니다.(명령어 입력시 경로를 쉽게 하기 위해서 Screnc.exe가 있는

폴더에 함께 넣은 것입니다.)

그리고 도스창을 열어서

98로 예를 들면

C:\Program Files\Windows Script Encoder>

Screnc.exe가 있는 폴더까지 찾아가서 명령어를 입력 합니다.

(참고, 찾아갈때 디렉토리 명은 dir을 이용해서 확인 하시고 이동 하세요 저같은 경우는 위에 폴더
까지 이동시 C:\cd progra~1\window~3 으로 이동 했습니다.)

그리고 명령어는 기본적인

screnc 원본파일 인코딩변환될파일

이렇게 하시면 됩니다. 기타 옵션은 도움말에 나와 있습니다.

스크립트 소스가 있는 원본 파일 a.htm을 b.htm에 인코딩 되게 하려면

C:\Program Files\Windows Script Encoder>screnc a.htm b.htm

이렇게 하시면 끝이 납니다.

a.htm을 b.htm으로 옮겨서 하는 이유는 원본 파일을 보존 하기 위해서 입니다.

그렇지 않고

C:\Program Files\Windows Script Encoder>screnc a.htm

이렇게 하시면 원본 파일 자체가 인코딩 됩니다.

그럼 인코딩 되는 예를 들면

<HTML>
<HEAD>
<TITLE>Script Encoder 예제 페이지</TITLE>
<SCRIPT LANGUAGE="JScript">
<!--//
//Copyright© 1998 Microsoft Corporation. All Rights Reserved.
//**Start Encode**
function verifyCorrectBrowser(){
if(navigator.appName == "Microsoft Internet Explorer")
if (navigator.appVersion.indexOf ("5.") >= 0)
return(true);
else
return(false);
}
function getAppropriatePage(){
var str1 = "실제 웹 사이트가 아니므로";
var str2 = "Microsoft Internet Explorer 5.0";
var str3 = "이 아닌 다른 브라우저";
var str4 = "과(와) 호환될 수 있는 페이지가 로드되지 않았습니다.";
if (verifyCorrectBrowser())
document.write(str1 + str2 + str4);
else
document.write(str1 + str2 + str3 + str4);
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="getAppropriatePage()">
</BODY>
</HTML>

위와 같은 원본 파일이 아래와 같이 인코딩 됩니다.

<HTML>
<HEAD>
<TITLE>Script Encoder 예제 페이지</TITLE>
<SCRIPT LANGUAGE="JScript.Encode">
<!--//
//Copyright© 1998 Microsoft Corporation. All Rights Reserved.
//**Start Encode**#@~^QwIAAA==@#@&0; mDkW P7nDb0zZKD.n1YAMGhk+Dvb`@#@&P,kW`UC7kLlDGDcl22gl:n~{'~Jtr1DGkW6YP&xDnD +OPA62sKD+ME#@#@&P,~~k6PvxC\rLmYGDcCwa.n.kkWU bx[+X66Pcr*cJ#,@*{~!*P~P,P~.YEMU`DDEbIP,P,+s/n@#@&P~P,~PM+O;Mx`WC^/n#pN6EU1YbWx,oObaw.WaDrCD+nmL+v# @#@&~P7lMPdY.q,'~J_CN,Y4rkP4nn PCx,C1Y;mV,+(PkrY~~l,wCLPmKhwmYk(snPSkDt~JI@#@&P~\m.PkY.+,'PE8MWA/.kPGDtDPDtmUPri@#@&,P-CMP/D.&,'Pr\rmMWkWWY~( YnD nY,2a2^WDn.,* !,Ep@#@&,P7lD,/D.c,'~JSW;s9Ptm-+,4+U~VKl9+[REI,Pr0,c\DrWHZW..mOAMGS/nM`*#@#@&P,~P9W^Es+UOchDbO+v/YMq~_,/DDfPQ~kY.c*IP,+sd@#@&~~,P[W1;s+UDRSDkD+vdYMF~_,/O.yP_,dYM&P3~dYMc*iNz&R @*^#~@
//-->
</SCRIPT>
</HEAD>
<BODY onload="getAppropriatePage()">
</BODY>
</HTML>

예제에서는 원본 파일에 script language="JScript"이지만 script language="JavaScript"라도

자동을 JScript.Encode로 변환 됩니다.
Posted by 알 수 없는 사용자
,
<SCRIPT language=javascript>
<!--
var hideBuf;
function hideBeforePrint() {
  hideBuf = document.body.innerHTML;
  document.body.innerHTML = '';
}
function showAfterPrint() {
  top.frames.document.location.href='이동하고자 하는 페이지 입력';
}
window.onbeforeprint = hideBeforePrint;
window.onafterprint = showAfterPrint;
  //-->
</SCRIPT>
Posted by 알 수 없는 사용자
,