PreviousPage란

WEB/ASP.NET 2007. 1. 23. 14:50
a.aspx -> b.aspx 로 이동시 (경우1)
a의 요소의 값에 접근하기 위해 사용

transfer된후(경우3)
이전페이지의 요소값에 접근하기 위해..


AND

a.aspx -> a.aspx  포스트백
          <-             라운트 트립

1) href 연결
a.aspx -> b.aspx 실행  Postback(x)/CrossPagePostBack(x)
b.aspx <-

2) 페이지간 게시(버튼) *PostBackUrl속성이용
a.aspx -> b.aspx   postback(x)/CrossPagePostBack(o)
b.aspx <-

3) 브라우저 리디렉션 Response.Redirection 메서드이용
a.aspx -> a.aspx  post back(o)
(버튼)  <-            post back(o)
(최종)   -> b.aspx (브라우저 리디렉션) post back(x)/CrossPagePostBack(x)
b.aspx <-

4) 서버 리디렉션 (Server.transfer메서드 이용)
a.aspx -> a.aspx -> b.aspx
a.aspx <- (내용은 a.aspx)

AND

AND

CSS정리

WEB/Javascript 2006. 9. 11. 02:24

ㅁ font(글꼴) ㅁ text(글자)ㅁ background(배경)
ㅁ border(테두리)ㅁ margin(여백)ㅁ padding(안쪽여백)
ㅁ list(목록)ㅁ position(위치)ㅁ classification(식별)
ㅁ table(표)ㅁ Printing(프린트)ㅁ scrollbar(스크롤바 색상)
ㅁ filter(필터 : Alpha, Blur, Chroma, FlipH, FlipV, Gray, Invert, Light, Mask, Xray)
/ CSS(Cascading Style Sheet) 의 속성 및 속성값
ㅁ NN: Netscape, ㅁ IE: Internet Explorer, ㅁ W3C: Web Standard
/ FONT(글꼴)TOP
CSSScript내 용NNIEW3C
fontfont글꼴에 관련된 속성을 설정4.04.0CSS1
font-familyfontFamily글꼴이름을 설정4.03.0CSS1
font-sizefontSize글자 크기를 설정4.03.0CSS1
font-stylefontStyle글자의 형태를 설정4.04.0CSS1
font-variantfontVariant글자의 대/소문자 설정6.03.0CSS1
font-weightfontWeight글자의 두께 설정4.04.0CSS1
/ TEXT(글자)TOP
CSSScript내 용NNIEW3C
colorcolor글자 색 설정4.03.0CSS1
directiondirection글자를 표시하는 방향 설정CSS2
letter-spacingletterSpacing글자 사이의 간격 설정6.03.0CSS1
text-aligntextAlign글자의 정렬 설정4.04.0CSS1
text-decorationtextDecoration글자의 꾸밈 및 형식 설정4.04.0CSS1
text-indenttextIndent문단의 첫 줄 들여쓰기 설정4.04.0CSS1
text-transformtextTransform대.소문자 변환 여부 설정4.04.0CSS1
line-heightlineHeight줄 간격 설정4.04.0CSS1
text-underline-positiontextUnderlinePosition밑줄이 그어지는 위치 지정5.5
word-spacingwordSpacing단어 사이의 간격 설정6.0CSS1
ime-modeimeMode입력모드 IME(한/영) 설정5.0CSS1
/ BACKGROUND(배경)TOP
CSSScript내 용NNIEW3C
backgroundbackground웹문서의 배경을 정의하며 각각의 속성값을 "," 없이 두 개 이상 설정 가능6.03.0CSS1
background-attachment backgroundAttachment 배경그림을 고정 또는 스크롤 설정6.03.0CSS1
background-colorbackgroundColor배경색 설정4.04.0CSS1
background-imagebackgroundImage배경그림 설정4.04.0CSS1
background-positionbackgroundPosition배경그림 위치 설정6.03.0CSS1
background-repeatbackgroundRepeat배경그림 반복 여부 설정4.04.0CSS1
/ BORDER(테두리)TOP
CSSScript내 용NNIEW3C
borderborder테두리의 너비, 형식, 색을 설정 두 개이상 설정 가능4.04.0CSS1
border-topborderTop위쪽 테두리의 너비, 형식, 색등을 설정6.03.0CSS1
border-bottomborderBottom아래 테두리의 너비, 형식, 색등을 설정6.03.0CSS1
border-leftborderLeft왼쪽 테두리의 너비, 형식, 색등을 설정6.03.0CSS1
border-rightborderRight오른쪽 테두리의 너비, 형식, 색등을 설정6.03.0CSS1
border-colorborderColor테두리의 색을 설정6.03.0CSS1
border-top-colorborderTopColor위쪽 테두리의 색을 설정6.04.0CSS2
border-bottom-colorborderBottomColor아래 테두리의 색을 설정6.04.0CSS2
border-left-colorborderLeftColor왼쪽 테두리의 색을 설정6.04.0CSS2
border-right-colorborderRightColor오른쪽 테두리의 색을 설정6.04.0CSS2
border-styleborderStyle테두리 형식 설정6.03.0CSS1
border-top-styleborderTopStyle위쪽 테두리 형식 설정6.04.0CSS2
border-bottom-styleborderBottomStyle아래 테두리 형식 설정6.04.0CSS2
border-left-styleborderLeftStyle왼쪽 테두리 형식 설정6.04.0CSS2
border-right-styleborderRightStyle오른쪽 테두리 형식 설정6.04.0CSS2
border-widthborderWidth테두리 두께 설정4.04.0CSS1
border-top-widthborderTopWidth위쪽 테두리 두께 설정4.04.0CSS1
border-bottom-widthborderBottomWidth아래 테두리 두께 설정4.04.0CSS1
border-left-widthborderLeftWidth왼쪽 테두리 두께 설정4.04.0CSS1
border-right-widthborderRightWidth오른쪽 테두리 두께 설정4.04.0CSS1
/ MARGIN(여백)TOP
CSSScript내 용NNIEW3C
marginmargin여백의 속성을 설정4.04.0CSS1
margin-topmarginTop위쪽 여백 설정4.03.0CSS1
margin-bottommarginBottom아래 여백 설정4.04.0CSS1
margin-leftmarginLeft왼쪽 여백 설정4.03.0CSS1
margin-rightmarginRight오른쪽 여백 설정4.03.0CSS1
/ PADDING(테두리와 내용과의간격 = 안쪽여백을 뜻함)TOP
CSSScript내 용NNIEW3C
paddingpadding테두리와 글자 사이 간격 설정4.0
padding-toppaddingTop위쪽 테두리와 글자 사이 간격 설정4.04.0CSS1
padding-bottompaddingBottom아래 테두리와 글자 사이 간격 설정4.04.0CSS1
padding-leftpaddingLeft왼쪽 테두리와 글자 사이 간격 설정4.04.0CSS1
padding-rightpaddingRight오른쪽 테두리와 글자 사이 간격 설정4.04.0CSS1
/ LIST(목록)TOP
CSSScript내 용NNIEW3C
displaydisplay객체에 인라인 또는 블럭단위의 박스를 생성 4.04.0CSS1
list-stylelistStyle목록의 형식,위치,그림의 속성을 설정6.03.0CSS1
list-style-imagelistStyleImage목록의 표시를 그림으로 설정6.03.0CSS1
list-style-positionlistStylePosition목록 항목의 위치를 설정6.03.0CSS1
list-style-typelistStyleType목록의 항목 표시자의 속성을 설정4.04.0CSS1
/ POSITION(위치)TOP
CSSScript내 용NNIEW3C
heightheight영역의 높이를 설정6.03.0CSS1
widthwidth영역의 너비를 설정4.04.0CSS1
toptop상단 테두리에서 떨어진 간격 설정4.04.0CSS2
bottombottom하단 테두리에서 떨어진 간격 설정5.0CSS2
leftleft상단 테두리을 기준으로 왼쪽 간격을 설정4.04.0CSS2
rightright상단 테두리을 기준으로 오른쪽 간격을 설정5.0CSS2
clipclip4각형 Block Box를 지정하는 수치만큼 가려서 안 보이도록 설정6.04.0CSS2
overflowoverflowwidth 속성이나 height 속성에 의해서 내용에 따라 화면의 크기를 제어6.04.0CSS2
positionposition화면에 표시할 위치를 설정6.04.0CSS2
visibilityvisibility화면에 표시 여부를 설정6.03.0CSS1
z-indexzIndexNetscape의 와 같은 개념6.04.0CSS2
/ CLASSIFICATION(식별)TOP
CSSScript내 용NNIEW3C
cursorcursor커서의 모양을 설정6.04.0CSS2
floatfloat상위 요소안에서 좌.우로 이동할 것인가를 설정4.04.0CSS1
clearclear상위 요소안에서 좌.우로 이동하지 않고 줄바꿈 설정4.04.0CSS1
zoomzoom객체의 크기를 확대/축소5.5CSS1
linklink링크 설정 : 링크관련 가상 클래스(link,visited,active,hover)3.0CSS1
/ TABLE(표)TOP
CSSScript내 용NNIEW3C
border-collapseborderCollapse표(TABLE)에 셀간격 설정5.0CSS2
table-layouttableLayout테이블(표)의 테이블 셀(cell), 줄(row), 컬럼(column)들의 배치에 사용되는 기능5.0CSS2
/ Printing (프린트)TOP
CSSScript내 용NNIEW3C
page-break-afterpageBreakAfter프린터로 출력할 때 다음 페이지로 페이지를 넘기는 것을 지정7.04.0CSS2
page-break-beforepageBreakBefore프린터로 출력할 때 다음 페이지로 페이지를 넘기는 것을 지정7.04.0CSS2
/ SCROLLBAR COLOR(스크롤바 색상)TOP
CSS내 용NNIEW3C
scrollbar-3dlight-color스크롤바의 스클롤 박스와 화살표 박스의 상단과 왼쪽 가장 자리에 색상 설정5.5CSS1
scrollbar-arrow-color스크롤바의 화살표 박스의 화살표에 색상을 설정5.5CSS1
scrollbar-base-color스크롤바의 arrow, shadow, darkshadow를 제외한 기본적인 곳에 설정5.5CSS1
scrollbar-darkshadow-color스크롤바의 스클롤 박스와 화살표 박스의 하단과 오른쪽 가장 자리에 색상 설정5.5CSS1
scrollbar-face-color스크롤바의 스클롤 박스와 화살표 박스 그리고 트랙의 표면 설정5.5CSS1
scrollbar-highlight-color스크롤바의 스클롤 박스와 화살표 박스의 상단과 왼쪽 가장 자리의 하이라이트 부분과 트랙 설정5.5CSS1
scrollbar-shadow-color스크롤바의 스클롤 박스와 화살표 박스의 하단과 오른쪽의 그림자 부분 설정5.5CSS1
scrollbar-track-color스크롤바의 트랙에 설정5.5CSS1
/ FILTER(필터)TOP
CSSScript내 용NNIEW3C
AlphaAlpha그림이나 글자에 투명도를 조정할 수 있는 명령어4.0
BlurBlur흐리게 하는 효과4.0
ChromaChroma지정된 특정색을 투명하게 하는 효과4.0
DropshadowDropshadow특정위치에 그림자를 만들어 줍니다4.0
FlipHFlipH이미지나 좌우가 바뀝니다.4.0
FlipVFlipV이미지나 상하가 바뀝니다.4.0
GlowGlow글자나 이미지에 지정된 색을 번지게 하는 효과를 나타냅니다4.0
GrayGray흑백 이미지를 만듭니다.4.0
InvertInvert색조, 순도, 명도(필름 효과)를 반전4.0
LightLight조명 효과를 주어 이미지의 특정 부분을 밝게 해줍니다.4.0
MaskMask불투명한 것은 투명한 마스크를 씌우고 투명한 것은 지정된 색으로 마스크를 씌워 줍니다.4.0
ShadowShadow지정하는 색상과 방향으로 그림자를 만들어 줍니다.4.0
WaveWave물결 형태의 웨이브를 만들어 주는 필터입니다.4.0
XrayXrayX-ray 사진 같은 효과를 나타내 주는 필터입니다.4.0
AND

IE계층도

WEB/Javascript 2006. 9. 7. 17:25

0

AND

작업중

WEB/Javascript 2006. 9. 6. 11:38
AND

====================================================================
다중 셀렉트~
====================================================================



<HTML>

<HEAD>

<TITLE></TITLE>

<style>

#sub1, #sub2, #sub3

{ position: absolute;left: 180px;visibility: hidden;z-index: 3}

</style>

<SCRIPT LANGUAGE="JavaScript">

<!--

catnumber = 3 // 카테고리의 갯수 설정

offset = 150

performOnchange = false

if (document.all) {

docObj = "document.all."

styleObj = ".style"

} else {

docObj = "document."

styleObj = ""

}

function openselect(subcat) {

popupselect = eval(docObj + subcat + styleObj)

popupselect.visibility = "visible"

}

function closeselect(submenu,subcat){

popupselect = eval(docObj + subcat + styleObj)

if (submenu.selectedIndex != 0) {

popupselect.visibility = "hidden"

numchoice = submenu.selectedIndex

choice = submenu[numchoice].value

myForm.subcategory.value = choice

submenu.selectedIndex = 0

}

}

function lock() {

performOnchange = false

}

function unlock() {

performOnchange = true

}

function selectSub(cat) {

for (i=1; i <= catnumber; i++) {

subcat = "sub" + i

popupselect = eval(docObj + subcat + styleObj)

popupselect.visibility = "hidden"

}

if (performOnchange == true) {

letsopen = "sub" + cat.selectedIndex

if (letsopen == "sub0") {

alert("카테고리를 선택 해 주세요")

choice = "- 서브 카테고리 -"

myForm.subcategory.value = choice

cat.focus()

} else {

openselect(letsopen)

lock()

}

}

}

// -->

</script>

</HEAD>

<BODY>



<!---- 첫번째 서브 카테고리 설정 ----->



<span id="sub1">

<select name="sub_singer" onchange="closeselect(this,'sub1')">

<option selected value="">- 서브 카테고리 -

<option value="1">1

<option value="2">2

<option value="3">3

</select>

</span>



<!---- 두번째 서브 카테고리 설정 ----->



<span id="sub2">

<select name="sub_hobby" onchange="closeselect(this,'sub2')">

<option selected value="">- 서브 카테고리 -

<option value="가">가

<option value="나">나

<option value="다">다

</select>

</span>



<!---- 세번째 서브 카테고리 설정 ----->



<span id="sub3">

<select name="sub_int" onchange="closeselect(this,'sub3')">

<option selected value="">- 서브 카테고리 -

<option value="A">A

<option value="B">B

<option value="C">C

</select>

</span>



<!---- 메인 카테고리 설정 ----->



<select name="main_category" onmouseover="unlock()" onchange="selectSub(this)">

<option selected value="">-- 카테고리 선택 --

<option value="숫자">숫자

<option value="한글">한글

<option value="영어">영어

</select>

<p>

<form name=myForm action="">

<input type="text" name="subcategory" readonly="readonly" value="- 서브 카테고리 -">

<input type=submit value=" 전송 ">

<!------------------------- 여기까지 ---------------------------------->



</BODY>

</HTML>


====================================================================

====================================================================
td 에 스크롤바 생성하기
====================================================================

<table border=0 width=0 height=0 cellspacing=0 cellpadding=0>
<tr>
<td width=200 height=100 valign="top">
<div style="overflow-y:scroll; width:200; height:100; padding:4px">
내용
</div>
</td>
</tr>
</table>


====================================================================

====================================================================
마우스 오른쪽 단추 클릭시 강제이동시키기
====================================================================

script language="JavaScript">
<!--
function click() {if (event.button==2) {
alert('오른쪽마우스 클릭했을때 할말');
location.href="페이지넘길 주소";
}
}
document.onmousedown=click
// -->
</script>

====================================================================

====================================================================
그림에 마우스 오버만 해도 링크 이동
====================================================================

<a href="" onmouseover="parent.location='이동될 주소'"><img src="이미지주소" border="0">

====================================================================

====================================================================
시작과 멈춤이 가능한 스크롤 텍스트
====================================================================

<marquee id="scroller" direction=up scrollAmount=5 width=200 height=150 style="background-color:#eeeeee;border:1px dot #999999">
여기에 원하는 글을 쓰세요 ^_^
</marquee>
<center>


<a href="scroller.start()">시작</a> &nbsp; <a href="scroller.stop()">멈춤</a>

<script language="JavaScript1.2">
if (document.all)
scroller.stop()
</script>


====================================================================

====================================================================
이미지 슬라이드(마우스오버시멈춤)
====================================================================

<script language="JavaScript1.2">
<!--

/*
Conveyor belt slideshow script-
?Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

//Specify the slider's width (in pixels)
var sliderwidth=330
//Specify the slider's height (in pixels, pertains only to NS)
var sliderheight=145
//Specify the slider's scroll speed (larger is faster)
var slidespeed=4

//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="#"><img src="http://skydare.net/img/benner1.gif"; width="90" height="30" border=0></a>'
leftrightslide[1]='<a href="#"><img src="http://skydare.net/img/benner2.gif"; width="90" height="30" border=0></a>'
leftrightslide[2]='<a href="#"><img src="http://skydare.net/img/benner3.gif"; width="90" height="30" border=0></a>'
leftrightslide[3]='<a href="#"><img src="http://skydare.net/img/benner1.gif"; width="90" height="30" border=0></a>'
leftrightslide[4]='<a href="#"><img src="http://skydare.net/img/benner2.gif"; width="90" height="30" border=0></a>'



///////do NOT edit pass this line////////////////////////////////////

var copyspeed=slidespeed
//copy contents of leftrightslide into one variable
for (i=0;i<leftrightslide.length;i++)
finalslide=finalslide+leftrightslide[i]+" "


if (document.all){
//dynamically write out the marquee tag
document.write('<marquee id="ieslider" scrollAmount=0 style="width:'+sliderwidth+'">'+finalslide+'</marquee>')
//stop marquee when mouse is over it
ieslider.onmouseover=new Function("ieslider.scrollAmount=0")
//re-enable marquee when mouse is out
ieslider.onmouseout=new Function("if (document.readyState=='complete') ieslider.scrollAmount=slidespeed")
}

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
document.ns_slider01.visibility="show"
setTimeout("window.onresize=regenerate",450)
intializeleftrightslide()
}
if (document.all)
ieslider.scrollAmount=slidespeed
}

//NS specific function for initializing slider upon page load
function intializeleftrightslide(){
document.ns_slider01.document.ns_slider02.document.write('<nobr>'+finalslide+'</nobr>')
document. ns_slider01.document.ns_slider02.document.close()
thelength=document.ns_slider01.document.ns_slider02.document.width
scrollslide()
}

//NS specific function for sliding slideshow
function scrollslide(){
if (document.ns_slider01.document.ns_slider02.left>=thelength*(-1)){
document.ns_slider01.document.ns_slider02.left-=slidespeed
setTimeout("scrollslide()",100)
}
else{
document.ns_slider01.document.ns_slider02.left=sliderwidth
scrollslide()
}
}
window.onload=regenerate2

//-->
</script>

<font color="#000000>
<ilayer width=&{sliderwidth}; height=&{sliderheight}; name="ns_slider01" visibility=hide>

<!--~============ LAYER ============~-->
</font><layer name="ns_slider02" onMouseover="slidespeed=0;" onMouseout="slidespeed=copyspeed" id="layer1" left="50" top="50" width="200" height="200" z-index="1"></layer>
<!--~========== END LAYER ==========~-->
</ilayer>

출처:하늘다래

====================================================================


====================================================================
html문서 없이 새창으로 이미지 띄우기
====================================================================

<img src="이미지주소" name="ranimage" border="0">

<script language="JavaScript1.1">
<!--
document.ranimage.src="이미지가 들어있는 폴더"+Math.round(Math.random()*3+.4)+".gif";
// -->
</script>

출처: 하늘다래

====================================================================

출처 : http://www.apoka.net/

AND

====================================================================
쿠키를 이용해서 광고창 제어하는 소스
====================================================================

<html>
<head>
<title>Untitled</title>
</head>

<body>
<SCRIPT language="JavaScript">
<!--
function setCookie( name, value, expiredays )
{
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function closeWin()
{
if ( document.test.chkbox.checked ){
setCookie( "notice0428", "done" ,30 );
}
self.close();
}

// -->
</SCRIPT>

<form name="test">
<p>여기에 원하시는 내용을 넣습니다.
<INPUT TYPE=CHECKBOX NAME="chkbox"><B>Do not open this window next time</B></font>
<input type=button value="close" onClick="closeWin();">
</form>
</body>
</html>
<!--start sima--><center><input type="button" value="View Source" onClick='window.location="view-source:"+window.location.href'><!--end sima-->

====================================================================


====================================================================
배경이 위쪽에만 나오게 하는 또다른 방법
====================================================================

<body bgcolor="" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="http://happyscript.com/testimage/bg3.jpg"; style="background-repeat:repeat-x" >

위쪽에만 반복적으로 나옵니다. ====================================================================


====================================================================
텍스트박스 안에 배경 이미지 넣기 textarea
====================================================================

<body>
일반 img tag을 이용해서 부른 경우입니다.<br>
<img src="http://happyscript.com/testimage/bg1.jpg"; xwidth=177 xheight=17 alt="" border="0">
<br>
텍스트박스(textare) 안에 스타일을 이용해서 배경이미지를 넣은 경우입니다.<br>
<textarea style="background-image:url(http://happyscript.com/testimage/bg1.jpg); width=313; height=416">
배경이미지와 텍스트가 같이 있습니다.
여기에서 텍스트를 입력할 수 있습니다.

====================================================================
배경색과 글자색을 바꿔주는 소스
====================================================================

<SCRIPT LANGUAGE="JavaScript">
<!--
function color() {
document.bgColor=(""+ colc.cc.value +""); // 배경색 부분
document.body.text=(""+ colc.tc.value +""); // 글자색 부분
}
//-->
</script>

<!--
폼 구성 부분
색 추가시는 간단히 option만 복사하여 늘려준 후 색을 적어주면 된다.
색은 아무거나 적어도 됨.. EX) black,#000000
//-->
<form name="colc">
<table border="1">
<tr>
<td colspan="2" align="center">
<b>Color Change</b>
</td>
</tr>
<tr>
<td align="center">
<b>배경색</b>
</td>
<td align="center">
<select name="cc" size="1">
<option value="black">Black
<option value="blue">Blue
<option value="green">Green
<option value="skyblue">Light Blue
<option value="orange">Orange
<option value="purple">Purple
<option value="red">Red
<option value="silver">Silver
<option value="Yellow">Yellow
<option selected value="white">White
</select>
</td>
</tr>
<tr>
<td align="center">
<b>글자색</b>
</td>
<td align="center">
<select name="tc" size="1">
<option selected value="black">Black
<option value="blue">Blue
<option value="green">Green
<option value="skyblue">Light Blue
<option value="orange">Orange
<option value="purple">Purple
<option value="red">Red
<option value="silver">Silver
<option value="Yellow">Yellow
<option value="white">White
</select>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" name="button" value="바꾸기" onclick="color()" style="width:100%">
</td>
</tr>
</table>
</form><input type=button name=simabuttonviewsource value="View Source" onClick='window.location="view-source:"+window.location.href'>

====================================================================

====================================================================
하루중 시간대에 따라 배경이 다른 자스
====================================================================

<script language="JavaScript">

<!-- Hide From Old Browsers

day=new Date() //..get the date

x=day.getHours() //..get the hour

if(x>=0 && x<4) {

document.write('<body background="../../../testimage/bg1.jpg">')

} else

if(x>=4 && x<12) {

document.write('<body background="../../../testimage/bg2.jpg">')

} else

if(x>=12 && x<18) {

document.write('<body background="../../../testimage/bg3.jpg">')

} else

if (x>=18 && x<24) {

document.write('<body background="../../../testimage/bg4.jpg">')

}

<!-- End Hiding -->

</script>

====================================================================

====================================================================
배경화면이 움직이는 자스
====================================================================

<BODY>

<script language="Javascript">
<!--
var background = "../../../testimage/bg8.jpg";
var speed = 0;

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

if (browserName != "Netscape" || browserVer >= 6) {

function moveback(movert,movedn,hPos,vPos) {

if (arguments[4])
document.body.style.backgroundImage = "url("" + arguments[4] + "")";

if (arguments[5])
document.body.style.backgroundRepeat = arguments[5]

if (!isNaN(hPos)) {
if ((movert!=0) && (hPos>0)) hPos=-100000
hPos += movert
}
if (!isNaN(vPos)) {
if ((movedn!=0) && (vPos>0)) vPos=-100000
vPos+= movedn
}
document.body.style.backgroundPosition= hPos + " " + vPos
if (isNaN(hPos)) hPos = """ + hPos + """
if (isNaN(vPos)) vPos = """ + vPos + """
setTimeout("moveback("+movert+","+movedn+","+hPos+","+vPos+")",speed)
}
moveback(1,1,0,0, background);
}
//-->
</script>


====================================================================
색이 줄단위로 바뀌는 테이블
====================================================================

<table border="0" width="500" height="200">
<tr onMouseOver="this.style.backgroundColor='#E8F6FF';return true;" onMouseOut="this.style.backgroundColor=''; return true;">
<td align=center><a href="'./sima_bbs.cgi?)">색이 줄단위로 바뀌는 테이블</a></font></td>
<td>--------------------------</td>
</tr>
</table>


====================================================================

====================================================================
페이지 들어갈때 배경색을 정하고 들어가는 소스
====================================================================

<body bgcolor="white" onload="var bg = prompt('색상코드를 입력해 주세요! 예: FF00FF',''); document.bgColor=bg;"><input type=button name=simabuttonviewsource value="View Source" onClick='window.location="view-source:"+window.location.href'>

====================================================================


====================================================================
색상-테이블의 색이 차츰차츰 변하게하는 자스 예제
====================================================================

<html>

<head>
<title>http://perlbbs.com<;/title>
<script language="javascript">
<!--
var tInC=null;
var tIdC=null;
var tIdCOn = new Array(0,0,0,0,0,0);
var tIdCOff = new Array(1,1,1,1,1,1);


function tBgFIn(obj, col,idNum) {
if(tInC != obj && tInC != null && tIdCOn[idNum] == 0) tBgFOut(tInC,tIdC);
if(tIdCOn[idNum] == 0) {
tIdCOn[idNum] = 1;
tIdCOff[idNum] = 0;
tInC=obj;
tIdC=idNum;
changeColor(obj, col);
}
}
function tBgFOut(obj,idNum) {
if(tIdCOff[idNum] == 0) {
tIdCOff[idNum] = 1;
tIdCOn[idNum] = 0;
changeColor(obj, "#ffffff");
}
}
function changeColor(obj, col) {
obj.filters.blendTrans.apply();
obj.style.backgroundColor= col;
obj.filters.blendTrans.play();
}
//-->
</script>

</head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<TABLE border=0 width=100%>

<TR>
<TD colSpan=2 align=center>
<TABLE border=2 borderColor=#ff9900 cellPadding=3 cellSpacing=3
style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-RIGHT: 0px; BORDER-TOP: 0px">

<TR><!-- 1 -->
<TD align=middle id=bgColorId1
onmouseover="tBgFIn(bgColorId1, '#CCFFCC',1)"
style="BACKGROUND-COLOR: #ffffff; FILTER: blendTrans(duration=0.3)"
vAlign=top width=120>
<TABLE bgColor=#ffff99 border=0
style="BORDER-TOP: rgb(255,153,0) 2px solid" width="100%">

<TR>
<TD width=100>
<P align=center><A
href="http://perlbbs.com"; terget=new><FONT
color=blue><B>마우스를 여기로 옮겨보세요</B></FONT></A></P></TD></TR></TABLE>
<P>이 테이블의 색이 점차적으로 변합니다.<BR></P></TD>
<TD align=middle id=bgColorId2
onmouseover="tBgFIn(bgColorId2, '#CCFFFF',2)"
style="BACKGROUND-COLOR: #ffffff; FILTER: blendTrans(duration=0.5)"
vAlign=top width=120>
<TABLE bgColor=#ffff99 border=0
style="BORDER-TOP: rgb(255,153,0) 2px solid" width="100%">

<TR>
<TD width=100>
<P align=center><A
href="http://perlbbs.com"; terget=new><FONT
color=blue><B>마우스를 여기로 옮겨보세요</B></FONT></A></P></TD></TR></TABLE>
<P>이 테이블의 색이 점차적으로 변합니다.<BR></P></TD>
<TD align=middle id=bgColorId3
onmouseover="tBgFIn(bgColorId3, '#FFFFCC',3)"
style="BACKGROUND-COLOR: #ffffff; FILTER: blendTrans(duration=0.5)"
vAlign=top width=120>
<TABLE bgColor=#ffff99 border=0
style="BORDER-TOP: rgb(255,153,0) 2px solid" width="100%">

<TR>
<TD width=100>
<P align=center><A
href="http://perlbbs.com"; terget=new><FONT
color=blue><B>마우스를 여기로 옮겨보세요</B></FONT></A></P></TD></TR></TABLE>
<P>이 테이블의 색이 점차적으로 변합니다.<BR></P></TD>

</TR></TABLE>
</body>

</html>
<!--start sima--><center><input type="button" value="View Source" onClick='window.location="view-source:"+window.location.href'><!--end sima-->

====================================================================


====================================================================
multiple select에 추가하는 예제~~
====================================================================

<HTML>
<HEAD>
<TITLE>apoka.net</TITLE>
<Script language=javascript>
<!--

function addPrd()
{
var frm = document.frmName1;

var add_value = frm.prd_group1[frm.prd_group1.selectedIndex].value;
var add_text = frm.prd_group1[frm.prd_group1.selectedIndex].text;

frm.prd_insert.options[frm.prd_insert.options.length] = new Option(add_text,add_value);
}

//-->
</script>
</HEAD>
<BODY>
<form name="frmName1">
<select name="prd_group1" style="width:190px;">
<option value="" selected>==대분류==</option>
<option value="01">apoka1</option>
<option value="02">apoka2</option>
<option value="03">apoka3</option>
<option value="04">apoka4</option>
</select>
<input type="button" value="추가" name="insetOK" onClick="addPrd()">
<select name="prd_insert" multiple style="width:100px;">
</select>
</form>
</BODY>
</HTML>

====================================================================

====================================================================
서브메뉴~~~~
====================================================================

<html>
<head>
<SCRIPT language=javascript>
var old='';

function menu(name)
{
submenu=eval("submenu_"+name+".style");
if(old!=submenu)
{
if(old!='')
{
old.display='none';
}
submenu.display='block';
old=submenu;
}
else
{
submenu.display='none';
old='';
}
}
</SCRIPT>
</head>
<body>

<a onclick="menu(1);" style="CURSOR:hand"><b>메뉴1</b></a>
<br>
<span id=submenu_1 style="DISPLAY: none;">
서브메뉴<br>
서브메뉴<p>
</span>

<a onclick="menu(2);" style="CURSOR:hand"><b>메뉴2</b></a>
<span id=submenu_2 style="DISPLAY: none;">
서브메뉴<br>
서브메뉴<p>
</span></body>
</html>

====================================================================

====================================================================
마우스 갖다대면 서브메뉴가~~
====================================================================

<html>
<head>
<title></title>
</head>

<style type="text/css">
<!--
body {font-family: "고딕", "Helvetica", "sans-serif"; font-size: 10px; xline-height:150%; color: #000000}
table {font-family: "고딕", "Helvetica", "sans-serif"; font-size: 10px; xline-height:100%; color: #000000}
A:link { text-decoration: none; color:#333333}
a:visited { color: #333333; text-decoration: none}
a:hover { color: blue; text-decoration: underline} -->
</style>

<script language="javascript">
<!--
var main_cnt = 6
function showhide(num) {
for (i=1; i<=main_cnt; i++) {
menu=eval("document.all.block"+i+".style");
imgch=eval("document.bar"+i);
if (num==i) {
if (menu.display=="block") {
menu.display="none";
imgch.src="+.gif";
}else {
menu.display="block";
imgch.src="-.gif";
}
//}else {
// menu.display="none";
// imgch.src="+.gif";
}
}
}

function show(num) {
for (i=1; i<=main_cnt; i++) {
menu=eval("document.all.block"+i+".style");
imgch=eval("document.bar"+i);
if (num==i) {
menu.display="block";
imgch.src="-.gif";
}else {
menu.display="none";
imgch.src="+.gif";
}
}
}

//-->
</script>
</HEAD>

<BODY>
<SCRIPT language="JavaScript">
document.cookie.expires="0";
</SCRIPT>
<center>
<TABLE borderColor=white cellSpacing=0 cellPadding=0 width=135 border=1>
<TR>
<TD xonclick="showhide(1);" onmouseover="this.style.backgroundColor='#ffffcc'; show(1);" style="CURSOR: hand" onmouseout="this.style.backgroundColor=''" borderColorLight=gray bgColor=#cccccc gray #e4e4e4 xheight=14>
<IMG name=bar1 src="+.gif" border=0 width=12 height=12>
A</TD>
</TR>
<TR>
<TD>
<SPAN id=block1 style="DISPLAY:none; MARGIN-LEFT:1px; xCURSOR:hand">
<TABLE borderColor=#ffffff cellSpacing=0 cellPadding=0 border=1 WIDTH="100%">
<TR height=12px onmouseover="this.style.backgroundColor='#ffffcc'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target=_top>
A-1</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ffffcc'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
A-2</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
A-3</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
A-4</a>
</TD></TR>
</TABLE>
</span>
</td>
</tr>

<TR>
<TD xonclick="showhide(2);" onmouseover="this.style.backgroundColor='#ccddff'; show(2);" style="CURSOR: hand" onmouseout="this.style.backgroundColor=''" borderColorLight=gray bgColor=#cccccc gray #e4e4e4 xheight=14>
<IMG name=bar2 src="+.gif" border=0 width=12 height=12>
<xa href="http://apoka.net"; target=_top>
B</a></TD>
</TR>
<TR>
<TD>
<SPAN id=block2 style="DISPLAY:none; MARGIN-LEFT:1px; xCURSOR:hand">
<TABLE borderColor=#ffffff cellSpacing=0 cellPadding=0 border=1 WIDTH="100%">
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
B-1</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
B-2</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
B-3</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<xA href="sub1-1">
B-4</a>
</TD></TR>
</TABLE>
</span>
</td>
</tr>

<TR>
<TD xonclick="showhide(3);" onmouseover="this.style.backgroundColor='#ccddff'; show(3);" style="CURSOR: hand" onmouseout="this.style.backgroundColor=''" borderColorLight=gray bgColor=#cccccc gray #e4e4e4 xheight=14>
<IMG name=bar3 src="+.gif" border=0 width=12 height=12>
<xa href="http://apoka.net"; target=_top>
C</a></TD>
</TR>
<TR>
<TD>
<SPAN id=block3 style="DISPLAY:none; MARGIN-LEFT:1px; xCURSOR:hand">
<TABLE borderColor=#ffffff cellSpacing=0 cellPadding=0 border=1 WIDTH="100%">
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
C-1</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
C-2 </a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
C-3</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
C-4</a>
</TD></TR>
</TABLE>
</span>
</td>
</tr>

<TR>
<TD xonclick="showhide(4);" onmouseover="this.style.backgroundColor='#ccddff'; show(4);" style="CURSOR: hand" onmouseout="this.style.backgroundColor=''" borderColorLight=gray bgColor=#cccccc gray #e4e4e4 xheight=14>
<IMG name=bar4 src="+.gif" border=0 width=12 height=12>
<xa href="http://apoka.net"; target=_top>
D</a></TD>
</TR>
<TR>
<TD>
<SPAN id=block4 style="DISPLAY:none; MARGIN-LEFT:1px; xCURSOR:hand">
<TABLE borderColor=#ffffff cellSpacing=0 cellPadding=0 border=1 WIDTH="100%">
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
D-1</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
D-2</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
D-3</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
D-4</a>
</TD></TR>
</TABLE>
</span>
</td>
</tr>

<TR>
<TD xonclick="showhide(5);" onmouseover="this.style.backgroundColor='#ccddff'; show(5);" style="CURSOR: hand" onmouseout="this.style.backgroundColor=''" borderColorLight=gray bgColor=#cccccc gray #e4e4e4 xheight=14>
<IMG name=bar5 src="+.gif" border=0 width=12 height=12>
<xa href="http://apoka.net"; target=_top>
E</a></TD>
</TR>
<TR>
<TD>
<SPAN id=block5 style="DISPLAY:none; MARGIN-LEFT:1px; xCURSOR:hand">
<TABLE borderColor=#ffffff cellSpacing=0 cellPadding=0 border=1 WIDTH="100%">
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<xA href="sub1-1">
E-1</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
E-2</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
E-3</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="right">
E-4</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<xa href="http://apoka.net"; target="right">
E-5</a>
</TD></TR>
</TABLE>
</span>
</td>
</tr>


<TR>
<TD xonclick="showhide(6);" onmouseover="this.style.backgroundColor='#ccddff'; show(6);" style="CURSOR: hand" onmouseout="this.style.backgroundColor=''" borderColorLight=gray bgColor=#cccccc gray #e4e4e4 xheight=14>
<IMG name=bar6 src="+.gif" border=0 width=12 height=12>
<xa href="http://apoka.net"; target=_top>
F</a></TD>
</TR>
<TR>
<TD>
<SPAN id=block6 style="DISPLAY:none; MARGIN-LEFT:1px; xCURSOR:hand">
<TABLE borderColor=#ffffff cellSpacing=0 cellPadding=0 border=1 WIDTH="100%">
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="new">
F-1</a>
</TD></TR>
<TR height=12px onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''" bgColor=#e4e4e4 borderColorLight=gray>
<TD align=right valign=center>
<a href="http://apoka.net"; target="new">
F-2</a>
</TD></TR>
</TABLE>
</span>
</td>
</tr>
</table>

</body>
</html>


====================================================================


출처 : http://www.apoka.net/

AND

가장 많이 사용되어지는 레이어메뉴 자바스크립트

<script Language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>

<body>부분..........

<span onMouseOver="MM_showHideLayers('layer1','','show','layer2','','hide')" style="cursor:hand">주메뉴1</span>
<br><br><span onMouseOver="MM_showHideLayers('layer1','','hide','layer2','','show')" style="cursor:hand">주메뉴2</span>

<div id="layer1" style="width:100px; height:200px; position:absolute; left:100px; top:85px; z-index:3; visibility:hidden;">
<a href="#">부메뉴</a><br>
<a href="#">부메뉴</a>
</div>


<div id="layer2" style="width:100px; height:200px; position:absolute; left:100px; top:108px; z-index:2; visibility:hidden;">
<a href="#">부메뉴</a><br>
<a href="#">부메뉴</a>
</div>

----------------------------------------------------------------------------------------------------------------------------------
5초후 자동으로 새창 띄우기
----------------------------------------------------------------------------------------------------------------------------------

html>
<head>
<title>apoka.net</title>
</head>
<body onload=cnt()>
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<form name="form1" method="get">
<p align="center"><font size="2"><b><br> 5초후 자동으로 이동 합니다.</b></font><br>
<br>
<input type="text" name="text1" size="2" style="font-family:'Comic Sans MS'; font-size:60pt; text-align:center; border-width:0; border-style:solid;" readonly><br> <br>
</td>
</tr>
</table>
<script language="JavaScript">
<!--
if(document.all)document.write('<embed src="tting.wav" width="100" height="100" border="0" hidden="true" autostart="false"><embed src="tting2.wav" width="100" height="100" border="0" hidden="true" autostart="false">')
if(document.all)document.write('<bgsound id="kts">')
var timer1=null
var a=5
function cnt(){
form1.text1.value = a
a--
kts.src='tting.wav'
timer1=setTimeout('cnt()',1000)
if(a==-1){
kts.src='tting2.wav';
clearTimeout(timer1);
newwin= window.open('http://devpia.com','new','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizeable=yes,width=1024,height=768,top=0,left=0')
}
}
//-->
</script>
</body>
</html>

----------------------------------------------------------------------------------------------------------------------------------
체크하면 테이블 색깔 바꾸기
----------------------------------------------------------------------------------------------------------------------------------
<html>
<SCRIPT LANGUAGE="JavaScript">
<!--
function check_user()

{

if (document.form.test1.checked == true)

{

obj1 = link_table.rows[0]; // 요건 테이블에 id를 주어서 거기의 row(즉 tr이 되겠죠.)를 변수로 선언하고

// obj1 = link_table.rows["aa"]; // 일케 해도 되요..

obj1.style.background = "red"; // 고넘의 속성을 변경시키는 겁니다.

}

else

{

obj1 = link_table.rows[0];

obj1.style.background = "white";

}

}
//-->
</SCRIPT>

<form name="form">

<BODY >

<table id="link_table" width="500" border="1">

<tr id="aa">

<td align=center ><input name="test1" type="checkbox" OnClick="check_user()"></td>

<td align=center >메뉴 1</td>

<td align=center >메뉴 2</td>

</tr>

</table>

</BODY>

</form>

</HTML>

----------------------------------------------------------------------------------------------------------------------------------
쿠키를 이용해서 북마크 페이지를 만드는 소스
----------------------------------------------------------------------------------------------------------------------------------
<script language="JavaScript">
<!--
var sepchar = "@"; // unique separator character
var BMtotal = 6; // max number of bookmarks permitted
var ShowCount = 0;
var expDays = 30; // 쿠키 지속 기간

var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function ListBookmarks() {
var NumBookmarks = GetCookie('PT_NumBookmarks');
var i;
var Bookmark;

if (NumBookmarks == null) {
NumBookmarks = 0;
}
ShowCount = 0; SwapColour = 0;

for (i=1; i <= NumBookmarks ; i++) {
Bookmark = GetCookie('PT_Bookmark'+i);
if (Bookmark != null) {
PrintBookmark(Bookmark, i);
}
}
}

function DeleteBookmark(Count) {
DeleteCookie('PT_Bookmark'+Count);
window.location = window.location;
}

function PrintBookmark (Bookmark, Count) {
var pairs = Bookmark.split(sepchar);
pairs[0]= unescape(pairs[0]);
pairs[1]= unescape(pairs[1]);
var BMtitle = pairs[0];
var BMaddress = pairs[1];

ShowCount++; // 북마크 보여지는 부분의 소스 - <table>는 폼 구성 부분에.. -_-;;
document.write('<tr>');
document.write('<th width="90%"><a href="'+BMaddress+'"><font color="blue">'+BMtitle+'</font></a></th>');
document.write('<th width="10%"><a href="DeleteBookmark('+Count+')" onmouseover="window.status=''+BMtitle+'을/를 삭제합니다. (Count : '+Count+')'; return true" onmouseout="window.status=''; return true"><font color="blue">Delete</font></a></th>');
document.write('</tr>');
}

function AddBookmark(BMtitle, BMaddress) {
var NumBookmarks = GetCookie('PT_NumBookmarks');
var i;
var ToDoItem;
var Bookmark;
var OldestBookmark = 0;
var CountBookmarks = 0;

if (NumBookmarks == null) {
NumBookmarks = 0;
}

for (i=1; i <= NumBookmarks ; i++) {
Bookmark = GetCookie('PT_Bookmark'+i);
if (Bookmark != null) {
CountBookmarks++;
if (OldestBookmark == 0) {
OldestBookmark = i;
}
}

if (Bookmark == BMtitle+sepchar+BMaddress) {
alert(''+BMtitle+'이/가 북마크 되었습니다.'); // 북마크 되었다는 메세지
history.go(0); // 페이지 새로고침 - 북마크시 페이지 새로고침해야 나옴..
return; }
}

if (CountBookmarks > BMtotal) {
DeleteBookmark(OldestBookmark);
}

NumBookmarks++;
SetCookie('PT_Bookmark'+NumBookmarks, BMtitle+sepchar+BMaddress, exp);
SetCookie('PT_NumBookmarks',NumBookmarks, exp);
alert(''+BMtitle+'이/가 북마크 되었습니다.'); // 북마크 되었다는 메세지
history.go(0); // 페이지 새로고침 - 북마크시 페이지 새로고침해야 나옴..
}

function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);

if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));

}

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;

while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}

function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;

document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");

}

function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

function addurl() { // 폼의 값을 받는부분..
AddBookmark(''+document.cookie_bookmark.addurl_title.value+'','http://'+document.cookie_bookmark.addurl_url.value+'');
}


//-->
</script>

<!--
폼 구성 부분
아래 북마크 소스 출려하는 자스의 경우 꼭
<table>을 붙여줘야함..
//-->
<form name="cookie_bookmark" method="post">
<table border="0" width="300" cellspacing="0" cellpadding="2" style="border:1 solid #000000;">
<tr>
<th colspan="3" width="300">쿠키 북마크</th>
<tr>
<tr>
<th width="100">북마크 타이틀</th>
<td colspan="2" align="center" width="200"><input type="text" name="addurl_title" tabindex="1" style="width:100%;"></td>
</tr>
<tr>
<th width="100">북마크 경로</th>
<th width="45"><input type="text" value="http://"; style="width:45px;" tabindex="4"readonly></th>
<td align="center" width="155"><input type="text" name="addurl_url" tabindex="2" style="width:100%;"></td>
</tr>
<tr>
<td colspan="3" align="center" width="300"><input type="button" value="click" onclick="addurl();" tabindex="3" style="width:50%;"></td>
</tr>
<tr>
<td colspan="3" width="300"><Br>

<script language="JavaScript">
<!--
document.write('<table border="0" width="100%" cellspacing="0" cellpadding="2">');
ListBookmarks(); // 북마크를 출력하는 소스
document.write('</table>');
//-->
</script>
</td>
</tr>
</table>
</form>


----------------------------------------------------------------------------------------------------------------------------------
몇번째 방문했는지 알려주는 스크립트
----------------------------------------------------------------------------------------------------------------------------------
<head>

<script language="JavaScript">
<!--
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0)
break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (2 < argc) ? argv[2] : null;
var path = (3 < argc) ? argv[3] : null;
var domain = (4 < argc) ? argv[4] : null;
var secure = (5 < argc) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}

function DisplayInfo() {
var expdate = new Date();
var visit;
// Set expiration date to a year from now.
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
if(!(visit = GetCookie("visit")))
visit = 0;
visit++;
SetCookie("visit", visit, expdate, "/", null, false);
var message;
if(visit == 1)
message="감사합니다. Happy에 처음 오신분이군요.";
if(visit== 2)
message="다시 방문해 주셔서 감사합니다.";
if(visit == 3)
message="또 오셨군요. 감사합니다.";
if(visit == 4)
message="기쁩니다, 다시 뵙게 되어서.";
if(visit == 5)
message="요즘 어떻게 지내셨어요 ?";
if(visit == 6)
message="오늘은 자료실을 둘러 보시죠...";
if(visit == 7)
message="이제는 자주 들리시네요...";
if(visit == 8)
message="자주 뵙게되서 기쁘군요 !";
if(visit == 9)
message="오늘은 날씨가 어떤가요 ?";
if(visit >= 10)
message="언제 커피 한잔 하실래요!";
alert("n"+"어서오세요.nn"
+"이번이 "+visit+ "번째 방문입니다." + "nn"
+message);
}

function ResetCounts() {
var expdate = new Date();
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
visit = 0;
SetCookie("visit", visit, expdate , "/", null, false);
}
// -->
</script>
</head>
<body bgcolor="#f5f5f5"
text="#009999"
link="#0066cc"
vlink="#0066cc"
alink="#0099ff"
onLoad="DisplayInfo()">
<p align=CENTER>
<font face="굴림">
방문자에게 다른 메세지 보여주기
</font>
<p align="center">
<font face="굴림" size="2">
새로고침 을 해보세요<br>
그럼 인사말이 바뀔거예요
</font>
</body><input type=button name=simabuttonviewsource value="View Source" onClick='window.location="view-source:"+window.location.href'>

AND

AND

ASP(.net) 프로그래머 이신분께 질문 - 디자인과 로직 분리문제

코딩 하실때, 웹디자이너가 넘긴 HTML 파일을 어떻게 작업하시나요?

대부분 웹디자인은 디자이너가 HTML 로 하게 되고, 웹프로그래머는

로직을 별도로 코딩하는걸로 아는데요. 실제 aspx 의 내용은 일반

HTML과 많이 다르지 않습니까?

예를 들어, 텍스트 박스의 경우
로직 작업을 하시는지...

그렇다고 디자이너 보고 스툐.넷 으로 디자인 하라고 할 수도 없을것 같은데...

디자인과 로직의 분리가 어떤식으로 가능한지 알고 싶습니다.




Amadeus [12/27 06:08] ::
INTERDEV같은것으로 하지 않을까요..
웹프로그래머는 아니지만...아시는분의 말씀을 인용하자면
디자이너와 협의하에 텍스트로 코딩한후 INTERDEV나 드림위버정도로 디버깅 정도 하는걸로 알고 있습니다.
거꾸로 메이커로 만들고 나중에 디버깅하는 경우도 보긴봤구요.

ENTIGI [12/27 06:34] ::
네, 드림위버에서는 서버콘트롤을 지원한다고 하더라구요. 그래서 드림위버로 간단한 폼 페이지를 작성하고 코딩을 했더니 에러가 발생하더군요.
뭔가 일일이 손질(?)해줘야 하는 것 같아서, 혹시 다른 방법이 존재하는지
질문을 해 보았습니다.
PHP도 그렇고 ASP 도 그렇고... 웹 프로그래밍이 더 번잡스럽게 느껴지네요.

흠흠... [12/27 06:51] ::
웹 프로그래밍은 안하지만... 대개 사용자의 interaction이 일어나는 부분은 미리 합의해서 정해두고 디자이너는 이미지를, 프로그래머는 로직을 만들지 않나요? 콘트롤들은 작동이 안되면 다시 만들어주고...

Amadeus [12/27 07:35] ::
아무래도 웹쪽은 코드작성이 매우 번거롭고 힘든작업이 많지요...
전 프로그래머는 아니지만....아는분의 Order는 이렇습니다.
프레임 구상및 핵심 모듈작업(DB커넥션이나 SP(MS SQL)나 데이터베이스 튜닝이 선행작업이고요.여기까지는 별 협의 사항이 없지요.
이 부분 이후에 디자이너와 많은 협의(여기까지는 싸울일은 없지요)가 오고갑니다.
잘 생각해보니 제가 쓴 글의 모든 작업을 하시는것 같습니다.
인터데브같은걸로 객체작업 같은것은 하는것 같고요
디버깅은 수작업 하시는게 많았던것 같습니다.
어차피 익스에서 뿌려주는 쪽으로 가야하니까요....
차츰 디자이너에게는 불가판정을 많이 내리게되고 관리자와 싸우고....힘들죠...
전 대부분 관리자의 입장에 많이 서봤고요 프로그래밍은 제가 알 수 있는 문제정도의 슛팅만 했습니다.DB에러나 서버 튜닝쪽이죠

STATIC [12/27 08:46] ::
ASP.NET 웹 개발자입니다.
저희도 코드와 디자인의 분리를 시도해 봤지만.. 결국 성공하지 못했습니다.
게다가 버젼관리를 위해서 VSS(Visual Source Safe)까지 도입해 놓은 상태이기 때문에, VS.NET 으로만 작업이 가능하죠. 전문디자이너와 개발자가 분리되어 있는 상황에서, 디자이너에게 VS.NET을 교육한다는것은 무리였습니다. 저희도 말씀하신대로, 디자이너는 HTML로만 작업하고, 개발자인 제가 그걸 ASP.NET으로 컨버팅하는 수고를 일일히 하고 있습니다. 저 같은 경우야 원래 HTML을 많이 했으니까 금방 적응했는데, 다른 개발자 분들은 HTML에 적응 못하시는 경우가 많더군요. 뭐, 그쪽도 그렇지만, 현업에서의 적용은 정말 힘든 일 같습니다. 하지만, 이에 대한 해결책으로 생각해 놓은게 있다면..첫째. 어떻게든 VS.NET 의 HTML코딩 부분만 디자이너에게 교육시켜서(HTML 텍스트만 수정) 최소한 태그 작성만이라도 가능하게 하고, 모든 페이지를 사용자 컨트롤로 만들어서 ASPX 페이지 안에 포함시키는 방법을 계획중입니다. ASPX 페이지는 UserControl을 담고 있는 껌데기 페이지가 되는 것이고, 내부는 ASCX파일을 수정함으로서 얼마든지 변형이 가능하게 합니다. 이 경우 단 점은
MrPresident [12/27 10:51] ::
저희도 3년동안 ASP.NET 제품을 만들고, 사이트에 배포 중이지만, 이 부분은 윗분처럼 개발자가 수작업으로 적용하는 수 밖에 없습니다.
(그리고, InterDev 같은 경우는 원 디자인이 깨진 경우에 HTML 태그 오류 찾는 경우에 사용합니다.)
한 3년 되니 이제는 오히려 Visual Studio .NET에서 작업하는게 오히려 편한 듯 합니다.

일반 웹 페이지이고, 재 사용이 전혀 없는 경우는 무조건 aspx 페이지로 만드는 것이 좋을 것입니다.

하지만, 동일한 로직이나 UI가 반복적으로 사용될 경우는 윗분처럼 User Control이나 Custom Control 사용해서, 페이지를 여러 모듈로 분리해서 사용하시는 것이 좋은 방법일 듯 합니다.
참고로 저희가 사이트에서 적용해 본 결과로는 User Control 보다는 Custom Control이 속도면에서 월등히 우수합니다.
그래서 저희는 User Control로 만들었던 제품을 이번에는 Custom Control로 변환하는 작업도 하고 있습니다.

http://www.clien.net/zboard/view.php?id=kin&page=2&sn1=&divpage=12&sn=off&ss=on&sc=on&sm=off&keyword=.net&select_arrange=headnum&desc=asc&no=59873
AND