- <script language="JavaScript">
- <!--
- function assignArray(text,delay) {
- this.text=text
- this.delay=delay
- }
- function createArray() {
- fadecolor=new Array("#663333","#cc6666","#ff9966","#6666cc","#cc6666","#6666cc")
-
- msg=new Array()
- msg[0]=new assignArray("³»¿ë 1",100)
- msg[1]=new assignArray("³»¿ë 2",100)
- setTimeout("typeIt()", 500)
- }
-
- var msgNo=0
- var characterSplit=0
- var character=1
- var colorNo=1
- function typeIt() {
- var insertHTML=""
- if(msgNo <= msg.length-1) {
- if(character <= msg[msgNo].text.length) {
- if(colorNo<6) {
- if(character != 1) {
- var insertHTML = '<SPAN style="font-family:Arial Black; font-size:20pt;
color:#663333">' //¸ØÃß¾úÀ» ¶§ÀÇ ±Û
- + msg[msgNo].text.substring(0, character-1) + '</SPAN>'
- }
- insertHTML += '<SPAN style="font-family:Arial Black; font-size:40pt;
color:'+fadecolor[colorNo]+'">' //¿òÁ÷ÀÏ ¶§ÀÇ ±Û
- + msg[msgNo].text.substring(characterSplit,
character) + '</SPAN>'
- if(document.layers) {
- document.typeWriter.document.write(insertHTML)
- document.typeWriter.document.close()
- }
- else if (document.all) {
- document.all.typeWriter.innerHTML = insertHTML
- }
- setTimeout("typeIt()", 50)
- colorNo++
- }
- else{
- colorNo=0
- character++
- characterSplit++
- setTimeout("typeIt()", 100)}
- }
- else {
- character=1
- characterSplit=0
- setTimeout("typeIt()", msg[msgNo].delay)
- msgNo++
- }
- }
- if(msgNo==2) {
- msgNo=0
- characterSplit=0
- character=1
- colorNo=1
- msg=0
- setTimeout("createArray()", 500) }
- }//-->
- </script>
-
- <body onload="createArray();">
- <div id="typeWriter" style="border-style:none; width:500px;
height:18px; position:absolute; left:100px; top:50px; z-index:1;">
<!--À§Ä¡-->