ÅؽºÆ®¿¡¾î¸®¾îÀÇ ³»¿ëÀ» À§·Î ¿Ã¸³´Ï´Ù.µ¥¸ð¸¦ ´·¯ È®ÀÎÇϼ¼¿ä.
Script Example |
<html> <head><title>µ¥¸ð</title>
<SCRIPT LANGUAGE = "JavaScript">
<!--
function AraVob() {
}
var ScreenLine = new AraVob(); ScreenLine[1] =
"¾È³çÇϽ´";
ScreenLine[2] = "ȨÁ¦ÀÛ¹ÙÀ̺íÀÔ³×´Ù";
ScreenLine[3] = "¿ª½Ã ¾µ¸»ÀÌ ¾ø±º¿ä";
ScreenLine[4] = "ÀßÇغÁ¿ä..";
ScreenLine[5] = "±×·³ À̸¸..¹Ùºü¼";
ScreenLine[6] = "ÈÄ´Ù´Ú";
ScreenLine[7] = "ÈÄ´Ù´Ú2";
ScreenLine[8] = "ȣȣÇÏÇÏÈ÷È÷";
ScreenLine[9] = "¿Ö...?";
ScreenLine[10] = "³ ¾µ¸»ÀÌ ¾øÀ»±î..";
ScreenLine[11] = "Áö°ã´Ù...¾µ¸»¾ø´Ù´Â¸»..";
ScreenLine[12] = "¿ª½Ã¾øÀ½.";
ScreenLine[13] = "³¡";
var msgNum = 1;
var msgCnt = 13;
// ¸Þ¼¼Áö¼ö
var typeSpeed = 50; //
¿Ã¶ó°¡´Â¼Óµµ
var lineDelay = 2000
// ¸¶Áö¸·ºÎºÐÀÇ µô·¹ÀÌ
var pagLen = 7; //
ÇÑÆäÀÌÁö´ç ¶óÀμö
var delay = typeSpeed;
var timerPS = null;
var linPntr = 0;
var tally = 1;
var msg = " ";
var outMsg = "";
var i = 0;
var cr="\r\n"
if ("3" <=navigator.appVersion.charAt(0))
{
var cr="\n"
}
else { ScreenLine[11]=" You
will need to upgrade your browser."
}
if (32<=navigator.userAgent.length && navigator.userAgent.substring(25,32)=="Opera/3")
{ ScreenLine[10]="Your version
of Opera show's a moving scroll bar button
when you" ScreenLine[12]=" but
the frame may not appear to be scrolling."+cr
}
// set up ScreenLines for display
for (x = msgCnt; 1 <= x; x--) { ScreenLine[x+pagLen]
= ScreenLine[x] + cr;
}
for (x = 1; x <= (pagLen); x++) {
ScreenLine[x] = " "
+cr;
}
msgCnt += pagLen;
msg = ScreenLine[1];
// end setup
function DisplayScroll() {
if (msgNum < pagLen) { delay
= typeSpeed;
}
else { delay = lineDelay;
}
ChangeMsg();
outMsg += msg;
self.document.forms[0].elements[0].value =
outMsg; timerPS = setTimeout("DisplayScroll()",delay);
}
function ChangeMsg() {
msgNum++;
if (msgCnt < msgNum) {
msgNum = 1;
}
if (pagLen <= tally) {
chgPage();
}
tally++;
msg = ScreenLine[msgNum];
}
function chgPage() {
if (msgNum < pagLen) {
linPntr = msgCnt - pagLen + msgNum + 1;
}
else { linPntr = msgNum
- (pagLen - 1);
}
outMsg = ScreenLine[linPntr];
for (p = 1; p < (pagLen - 1); p++) {
linPntr++;
if (msgCnt < linPntr) {
linPntr = 1; }
outMsg += ScreenLine[linPntr];
}
}
function quitDisplay() { self.document.forms[0].elements[0].value
= "Scroll a Page for yourself today!";
}
// --> </SCRIPT> </head>
<BODY onLoad = "DisplayScroll()";
onUnload = "quitDisplay()"> <FORM
NAME = "msgform" ACTION = " "> <TEXTAREA
NAME = "msgarea" COLS = 69 ROWS = 8>
JavaScript (or JScript) Power needed.
</TEXTAREA> </FORM> </body>
</html> |
|
|
¼³¸í |
¸Þ¼¼Áö¿Í ±Û¿Ã¶ó°¡´Â ¼ÓµµµîÀ» Á¶ÀýÇغ¸¼¼¿ä. Âü°í·Î textareaÀÇ cols´Â
¿·À¸·Î ½áÁö´Â ¼ö,rows´Â ¾Æ·¡·Î ½áÁö´Â ¶óÀμöÀÔ´Ï´Ù. ÀûÀýÇÑ ¸Þ¼¼ÁöÀÇ ¼ö¸¦
¼±ÅÃÇÏ¿© ÅؽºÆ®¿¡¾î¸®¾îÀÇ Å©±â¸¦ Á¶ÀýÇؼ ÇÑÆäÀÌÀå º¸¿©ÁÙ ¸Þ¼¼Áö¸¦ °áÁ¤Çؼ
Àû¿ë½ÃÅ°¼¼¿ä |
|
|
|
|