'2008/02/01'에 해당되는 글 91건

  1. 2008.02.01 페이지 테두리 넣어 깜밖이기
  2. 2008.02.01 다이나믹 컬러 색상표
  3. 2008.02.01 프레임 나누어진 페이지 늘리기 - 확장시키기
  4. 2008.02.01 프레임 나타내기(히든프레임)와 숨기기
  5. 2008.02.01 셀렉트 박스 새창과 현재창을 라이오 버튼으로 제어
  6. 2008.02.01 셀렉트를 이용해서 이미지 선택 나타내기
  7. 2008.02.01 이미지 슬라이드
  8. 2008.02.01 쿠키 적용으로 체크하면 다음부터는 뜨지 않는 창
  9. 2008.02.01 이미지에 섬광 효과 주기
  10. 2008.02.01 자바스크립트와 테이터베이스 연동
  11. 2008.02.01 이미지 슬라이드
  12. 2008.02.01 TextField의 Align - 텍스트 정렬 및 콤마 찍기
  13. 2008.02.01 텍스트 애니메이션
  14. 2008.02.01 웹페이지 대화상자 (부모창 위에 새창이 항상 최상위에 존재)
  15. 2008.02.01 다중 셀렉트(select) 박스 3
  16. 2008.02.01 input 또는 폼안의 포커스 이동 및 글자 길이 제한
  17. 2008.02.01 매월 마지막 날자 구하기
  18. 2008.02.01 문서길이를 자동으로 맞추는 아이프레임 리사이즈 소스 6가지
  19. 2008.02.01 체크박스 전체선택 / 전체해제
  20. 2008.02.01 마우스 좌표값
  21. 2008.02.01 스크립트 인코딩 (Windows Script Encoder)
  22. 2008.02.01 익스플로러에서 인쇄 누르면 페이지 이동 시키기
  23. 2008.02.01 마우스 오버/아웃시 소리효과 초간단 자바스크립트
  24. 2008.02.01 새창 가운데 열기 - 중앙에 열기
  25. 2008.02.01 필드값의 유효성을 검사하는 함수
  26. 2008.02.01 원 클릭으로 클립보드 복사하기 3 - input
  27. 2008.02.01 타이틀바에 년/월/일/시간/분/초 나타내기
  28. 2008.02.01 태그피아 웹에디터 (태그 연습장, 인코딩, 디코딩, 색상표, 특수문자 변환, 한줄소스)
  29. 2008.02.01 다중 셀렉트(select) 박스
  30. 2008.02.01 다중 셀렉트(select) 박스 2
<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 알 수 없는 사용자
,
<bgsound id=music loop="1"><!-- // 몇번 들려줄지 숫자를 정해주세요.-->

<script>
function bgsoundcall(str)
{
eval(str);
}
</script>
</head>

<body>
<a OnClick="bgsoundcall('music.src=\'사운드.wav\'');">소리가 나요</a>

OnClick 대신 onmouseover , onmouseout을 삽입하시면...

오버마우스, 아웃포커싱 마우스 효과를 쓰실 수 있습니다.
Posted by 알 수 없는 사용자
,
새창으로 열 문서에 삽입하시면 됨니다.

아래 스크립트를 head 태그 안에 삽입하세요.

<script LANGUAGE=JavaScript>
function ctcwin(){
        window.moveTo((window.screen.width-document.body.clientWidth)/2,(window.screen.height-document.body.clientHeight)/2-45);
}
</script>

바디 태그에 onLoad='ctcwin();' 삽입하시구요.
ex - <body onLoad='ctcwin();' leftmargin='0' marginwidth='0' marginheight='0''>

또는 문서 끝 </body> 바로 윗줄에 onload대신 아래 스크립트를 삽입.
<script>
ctcwin()
</script>
Posted by 알 수 없는 사용자
,
/**
* 입력값이 NULL인지 체크
*/
function isNull(input) {
    if (input.value == null || input.value == "") {
        return true;
    }
    return false;
}

/**
* 입력값에 스페이스 이외의 의미있는 값이 있는지 체크
* ex) if (isEmpty(form.keyword)) {
*         alert("검색조건을 입력하세요.");
*     }
*/
function isEmpty(input) {
    if (input.value == null || input.value.replace(/ /gi,"") == "") {
        return true;
    }
    return false;
}

/**
* 입력값에 특정 문자(chars)가 있는지 체크
* 특정 문자를 허용하지 않으려 할 때 사용
* ex) if (containsChars(form.name,"!,*&^%$#@~;")) {
*         alert("이름 필드에는 특수 문자를 사용할 수 없습니다.");
*     }
*/
function containsChars(input,chars) {
    for (var inx = 0; inx < input.value.length; inx++) {
       if (chars.indexOf(input.value.charAt(inx)) != -1)
           return true;
    }
    return false;
}

/**
* 입력값이 특정 문자(chars)만으로 되어있는지 체크
* 특정 문자만 허용하려 할 때 사용
* ex) if (!containsCharsOnly(form.blood,"ABO")) {
*         alert("혈액형 필드에는 A,B,O 문자만 사용할 수 있습니다.");
*     }
*/
function containsCharsOnly(input,chars) {
    for (var inx = 0; inx < input.value.length; inx++) {
       if (chars.indexOf(input.value.charAt(inx)) == -1)
           return false;
    }
    return true;
}

/**
* 입력값이 알파벳인지 체크
* 아래 isAlphabet() 부터 isNumComma()까지의 메소드가
* 자주 쓰이는 경우에는 var chars 변수를
* global 변수로 선언하고 사용하도록 한다.
* ex) var uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
*     var lowercase = "abcdefghijklmnopqrstuvwxyz";
*     var number    = "0123456789";
*     function isAlphaNum(input) {
*         var chars = uppercase + lowercase + number;
*         return containsCharsOnly(input,chars);
*     }
*/
function isAlphabet(input) {
    var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
    return containsCharsOnly(input,chars);
}

/**
* 입력값이 알파벳 대문자인지 체크
*/
function isUpperCase(input) {
    var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    return containsCharsOnly(input,chars);
}

/**
* 입력값이 알파벳 소문자인지 체크
*/
function isLowerCase(input) {
    var chars = "abcdefghijklmnopqrstuvwxyz";
    return containsCharsOnly(input,chars);
}

/**
* 입력값에 숫자만 있는지 체크
*/
function isNumber(input) {
    var chars = "0123456789";
    return containsCharsOnly(input,chars);
}

/**
* 입력값이 알파벳,숫자로 되어있는지 체크
*/
function isAlphaNum(input) {
    var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
    return containsCharsOnly(input,chars);
}

/**
* 입력값이 숫자,대시(-)로 되어있는지 체크
*/
function isNumDash(input) {
    var chars = "-0123456789";
    return containsCharsOnly(input,chars);
}

/**
* 입력값이 숫자,콤마(,)로 되어있는지 체크
*/
function isNumComma(input) {
    var chars = ",0123456789";
    return containsCharsOnly(input,chars);
}

/**
* 입력값이 사용자가 정의한 포맷 형식인지 체크
* 자세한 format 형식은 자바스크립트의 `regular expression`을 참조
*/
function isValidFormat(input,format) {
    if (input.value.search(format) != -1) {
        return true; //올바른 포맷 형식
    }
    return false;
}

/**
* 입력값이 이메일 형식인지 체크
* ex) if (!isValidEmail(form.email)) {
*         alert("올바른 이메일 주소가 아닙니다.");
*     }
*/
function isValidEmail(input) {
//    var format = /^(\S+)@(\S+)\.([A-Za-z]+)$/;
    var format = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/;
    return isValidFormat(input,format);
}

/**
* 입력값이 전화번호 형식(숫자-숫자-숫자)인지 체크
*/
function isValidPhone(input) {
    var format = /^(\d+)-(\d+)-(\d+)$/;
    return isValidFormat(input,format);
}

/**
* 입력값의 바이트 길이를 리턴
* ex) if (getByteLength(form.title) > 100) {
*         alert("제목은 한글 50자(영문 100자) 이상 입력할 수 없습니다.");
*     }
* Author : Wonyoung Lee
*/
function getByteLength(input) {
    var byteLength = 0;
    for (var inx = 0; inx < input.value.length; inx++) {
        var oneChar = escape(input.value.charAt(inx));
        if ( oneChar.length == 1 ) {
            byteLength ++;
        } else if (oneChar.indexOf("%u") != -1) {
            byteLength += 2;
        } else if (oneChar.indexOf("%") != -1) {
            byteLength += oneChar.length/3;
        }
    }
    return byteLength;
}

/**
* 입력값에서 콤마를 없앤다.
*/
function removeComma(input) {
    return input.value.replace(/,/gi,"");
}

/**
* 선택된 라디오버튼이 있는지 체크
*/
function hasCheckedRadio(input) {
    if (input.length > 1) {
        for (var inx = 0; inx < input.length; inx++) {
            if (input[inx].checked) return true;
        }
    } else {
        if (input.checked) return true;
    }
    return false;
}

/**
* 선택된 체크박스가 있는지 체크
*/
function hasCheckedBox(input) {
    return hasCheckedRadio(input);
}

* 출처 : 아이쿠 http://iq140.new21.org/
Posted by 알 수 없는 사용자
,


  1. <script>
  2. function selectall(s){
  3.         window.clipboardData.setData("Text", document.all(s).value);
  4.         alert('소스가 클립보드에 저장되었습니다.\n\n복사할 곳에 Ctrl + V 로 붙여넣기 하시면 됨니다.');
  5. }
  6. </script>
  7. <a href="#none" onclick="javascript:selectall('copy_text')">Copy</a><br>
  8. <input id="copy_text" value="복사할내용">
Posted by 알 수 없는 사용자
,
  1. <SCRIPT LANGUAGE="JavaScript">
  2. <!-- Begin
  3. function clock() {
  4. var date = new Date()
  5. var year = date.getYear()
  6. var month = date.getMonth()
  7. var day = date.getDate()
  8. var hour = date.getHours()
  9. var minute = date.getMinutes()
  10. var second = date.getSeconds()
  11. //var months = new Array("", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC")
  12. var months = new Array("", "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월")
  13. var monthname = months[month]
  14. var title_name = "♡ 카멜롯™의 소스천국 태그피아 ♡"; // 타이틀 제목
  15. if (hour > 12) { hour = hour - 12 }
  16. if (minute < 10) { minute = "0" + minute }
  17. if (second < 10) { second = "0" + second }
  18. document.title = title_name + " ☞ " + year + "년 " + monthname + " " + day + "일 " + hour + "시 " + minute + "분 " + second + "초"
  19. setTimeout("clock()", 1000)
  20. }
  21. // End -->
  22. </script>
  23. <BODY onLoad="clock();">
Posted by 알 수 없는 사용자
,
http://oxtag.com/html/ex/CTediter/CTediter.html

웹 태그연습장 - 태그 제너레이터
인코딩
디코딩
색상표
특수문자 변환
한줄소스
웹소스보기 (XP 소스보기 대체용)

사용자 삽입 이미지






Posted by 알 수 없는 사용자
,
검색 단어 : 셀렉트, select, 하위 카테고리

소스는 업로드 클릭하세요.
참고로 제가 만든거 아닙니다.

예제 1 http://oxtag.com/html/ex/dynamicselect/js_dynamicselect.html

예제 2 http://oxtag.com/html/ex/dynamicselect/js_dynamicselect2.html

예제 3 http://oxtag.com/html/ex/dynamicselect/js_dynamicselect3.html

예제 4 http://oxtag.com/html/ex/dynamicselect/asp_dynamicselect.phps
Posted by 알 수 없는 사용자
,
  1. <style type=text/css>
  2. select {font-size:9pt;font-family:굴림;}
  3. </style>
  4. </head>
  5. <body bgcolor=white text=black link=blue vlink=purple alink=red>
  6. <table align=center>
  7. <form name=form method=POST action="">
  8. <tr>
  9. <td>
  10. <select name="high_cg" size="1" onchange="changeCG(document.form.high_cg)"></select>
  11. <select name="mid_cg" size="1">
  12. <option value="중분류">중분류</option>
  13. </select>
  14. </td>
  15. </form>
  16. <script language="JavaScript">
  17. <!-- JavaScript
  18. midCG = new Array(20);
  19. midCG[0] = "";
  20. midCG[1] = new Array("TV","라디오","인터넷방송","신문","웹진","잡지","각종 통계","쿨사이트");
  21. midCG[2] = new Array("영화","연극/음악","만화-애니메이션","문학","연예","유머-재미","게임");
  22. midCG[3] = new Array("공연예술","공예","디자인","박물관,화랑","예술가"," 전통예술");
  23. midCG[4] = new Array("정부기관","정치","법","군대","대사관","시민단체");
  24. midCG[5] = new Array("사람들","사회이슈","문화","기관-단체","환경-자연","식음료","동호회");
  25. midCG[6] = new Array("회사","광고","투자-재테크","금융","증권","보험","부동산","취업-채용","창업");
  26. midCG[7] = new Array("쇼핑몰"," 경매","공동구매 ","가격비교","소비자평가");
  27. midCG[8] = new Array("무료정보","무료다운","이벤트-경품 소개");
  28. midCG[9] = new Array("하드웨어","소프트웨어","프로그래밍 언어","멀티미디어","게임","보안과 암호","인터넷종합","채팅","통신-네트워크","OS");
  29. midCG[10] = new Array("패션","미용","가족","결혼","육아","다이어트","인테리어");
  30. midCG[11] = new Array("여행-관광","취미","레저","자동차","게임");
  31. midCG[12] = new Array("실내스포츠","실외스포츠","스포츠스타","스포츠관련 미디어","스포츠종합");
  32. midCG[13] = new Array("인문과학","사회과학","자연과학","공학");
  33. midCG[14] = new Array("건강일반","병원","의학정보","한의학","의료상담","다이어트");
  34. midCG[15] = new Array("교육일반","학교","선생님","기관-단체","온라인교육","시험-자격증");
  35. midCG[16] = new Array("유학","도서관","전문가서비스");
  36. midCG[17] = new Array("학과","동아리","학생회","동문-동창회","연구소","소모임");
  37. midCG[17] = new Array("기독교","천주교","불교","민족종교","기타");
  38. midCG[18] = new Array("가수","탤런트","개그맨","영화배우","모델","스포츠스타","순수예술인");
  39. midCG[19] = new Array("기업","사람","기타");
  40. listHighCG = new Array("대분류 선택","뉴스-미디어","엔터테이먼트","예술","정치 및 법","사회문화","경제","쇼핑","공짜&무료","컴퓨터,인터넷","가정-여성","레크리에이션","스포츠","학문-과학","건강-의학","교육","학교","종교","팬클럽","안티사이트");
  41. highSelect = document.form.high_cg;
  42. midSelect = document.form.mid_cg;
  43. function strPos(s, s1)
  44. {
  45. if(s1 == null) return;
  46. for(i=0; i<s.length; i++)
  47. {
  48. if(s[i] == s1) return i;
  49. }
  50. return -1;
  51. }
  52. function setMidCG(high_cg,mid_cg)
  53. {
  54. var num = midSelect.length;
  55. for(i=0; i<num; i++)
  56. {
  57. midSelect.options[1]= null;
  58. }
  59. midSelect.options[0] = new Option("중분류 선택","");
  60. for(var i=0; i<midCG[high_cg].length; i++)
  61. {
  62. var myitem = new Option(midCG[high_cg][i])
  63. midSelect.options[i+1] = myitem;
  64. }
  65. if(mid_cg > 0)
  66. {
  67. midSelect.options.selectedIndex = mid_cg;
  68. }
  69. }
  70. function changeCG(menu)
  71. {
  72. selectNum = menu.selectedIndex;
  73. setMidCG(selectNum,0);
  74. }
  75. function init()
  76. {
  77. for(var i=0; i<listHighCG.length; i++)
  78. {
  79. var item = new Option(listHighCG[i])
  80. highSelect.options[i] = item;
  81. }
  82. pos = strPos(listHighCG,"컴퓨터,인터넷");
  83. if(pos < 1) pos = 0;
  84. setMidCG(pos,strPos(midCG[pos],"인터넷종합")+1);
  85. highSelect.options.selectedIndex = pos;
  86. }
  87. window.onload = init;
  88. // - JavaScript - -->
  89. </script>
  90. </tr>
  91. </table>
Posted by 알 수 없는 사용자
,