top of page

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=big5">

<title>打字機</title>

</head>

<body onLoad="typeMsg()">

<p align="center"><font size="10">李權明老師生日快樂</font></p>

<p align="center"><font size="6" color="blue">Typing_Effect_by_Takashi</font></p>

<script type="text/javascript"> 

<!--

 var msgLine = new Array();  

 msgLine[0]  = "Dear teacher 李權明老師 ";

 msgLine[1]  = "  I am writing to you to express my thanks for your help in learning.";

 msgLine[2]  = "Not only the calculus but also the windows programming in C#";

 msgLine[3]  = "Both of those subjects are so useful to me";

 msgLine[4]  = "I want to thank you so much for putting in effort and being ";

 msgLine[5]  = "patient when it comes to teaching us.";

 msgLine[6]  = "I learned a lot of math skills from you";

 msgLine[7]  = "I wish I can be better at windows programing";

 msgLine[8]  = "You have worked so hard to help us improve not only the concept of calculus";

 msgLine[9]  = "but also the windows interface design";

 msgLine[10] = "I want you to know how much I appreciate it and happy birthday Teacher李權明";

 

 var outMsg = ""; // 當作顯示的字串

 var i = 0; // 當作字元指標

 var lineNo = 1; // 當作行數的指標

 var timerID = null; // 計時器的ID

 var msgNum = 0; // 設定第一個顯示的句子

 var typeSpeed = 70; // 秀字的速度(毫秒)

 var pageLen = 5; // 一頁的行數,一般為文字區塊的列數

 var delay = typeSpeed;

 var cr = "\n";

 for(var x = 0; x<msgLine.length; x++){

msgLine[x] = msgLine[x] + cr; // 加上換行字元

 } 

 var msg = msgLine[0];

 

 function typeMsg(){ 

if (i == msg.length) ChangeMsg(); // 若為句子的最後一個字元

outMsg = outMsg + msg.charAt(i); // 加上一個字元

i++; // 字元指標加一

if (msg.charAt(i) == cr) delay = 1000; // 若秀完一個句子

else  delay = typeSpeed;

document.myform.mytxt.value=outMsg;

timerID = setTimeout("typeMsg()",delay);

 }

 

 function ChangeMsg() { // 換行函式

i = 0; // 字元指標回到第一個

lineNo++; // 行數指標加一

msgNum++; // 句子指標加一

if (msgNum == msgLine.length) { // 如果到最後一個句子

 msgNum = 0; // 跳到第一個句子

 outMsg=msgLine[msgNum].charAt(i); // 顯示第一個字元

 i++; // 字元指標加一

 lineNo = 1; // 行數指標指到第一行

}

if (pageLen < lineNo) { // 如果行數大於一頁時

 outMsg=msgLine[msgNum].charAt(i);

 i++;

 lineNo = 1;

}

msg = msgLine[msgNum]; // 變換要顯示的句子

 }

//-->

</script> 

<center>

<form name="myform"> 

 <textarea name="mytxt" cols="80" rows="30"></textarea> 

</form>

</center>

</body>

</html>

 

ADDRESS

桃園銘傳大學

Tel: 123-456-7890

TEL HOURS

Mon-Fri: 7am-10pm

Saturday: 8am-10pm

Sunday: 8am-11pm

FACEBOOK ME:

周冠宇
  • Facebook Metallic
  • Twitter Metallic
  • Google Metallic

© 2023 by GROOMSMAN Proudly created with Wix.com

bottom of page