2013年11月10日 星期日

Homework 11-5-2013








<!DOCTYPE html>
<html>  
  <head>  
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">  
    <meta http-equiv="Content-Script-Type" content="text/javascript">  
    <script type="text/javascript">  
      var re = /\(?\d{3}\)?([-\/\.])\d{3}\1\d{4}/;  
      function check(){  
    var OK = re.exec(f.q.value); 
        if (!OK)  
          {window.alert(RegExp.input + " isn't a phone number with area code!"); 
         f.q.value="";
        document.f.q.focus();
        return false; }     
         else
       window.alert("Thanks, your phone number is " + OK[0]);  
        
 }
    </script>  
  </head>  
  <body>  
    <p>Enter your phone number (with area code) and then click "Check".
        <br>The expected format is like ###-###-####.</p>
    <form name="f" action="#" onsubmit="return check()" method="get">  
       check:<input type="text" name="q">      
     <input id="phone" type="submit" value="check">
    </form>  
  </body>  
</html>

2013年11月3日 星期日

Homework 10-28-2013

秋天的到來萬物像被染色一般
樹葉變得橘紅,蘋果變紅,梨子轉黃
樹葉也一片片的凋零,跳舞般的落下
接著鋪滿整條道路
搭配著夕陽,彷彿一幅絕世名畫
讓人經過時會想多看幾眼
秋天,有讓人感到特別孤寂的感覺
但也有它獨特的美麗
落葉的美,秋風的美,享受這美景的人的美。