2013年12月30日 星期一

LAB 38


上圖為html4.0 code需要用一個flash來播放,且code 的長度較長。



此為html5.0 code的長度較短,且感覺比較清晰。
                                                            兩者都會自動播放

LAB 37


Homework 12-23-2013



2013年12月9日 星期一

LAB29





LAB 28

1.建立有意義的網頁標題



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-hk" lang="zh-hk">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline EN v2.0" l gen true for "http://www.hongkongpost.com" r (nz 1 vz 1 lz 1 oz 1 cz 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.hongkongpost.com" r (n 0 s 0 v 0 l 0))' />
<title>香港郵政 - &quot;我的心意卡&quot; 訂製服務 - 給你的蛇BB一份特別的禮物</title>

  <h1 class="title">&quot;我的心意卡&quot; 訂製服務</h1>
          <table class="pcard" cellspacing="0" cellpadding="0">
          <tr>


2.提供能取代圖片的文字

  <a href='http://www.gov.hk/tc/residents/' rel="external" onmouseout='MM_swapImgRestore()' onblur='MM_swapImgRestore()' onmouseover='MM_swapImage("mainbar1e","","/common/images/header/mainbar1_f2e.gif",1)'
                                                onfocus='MM_swapImage("mainbar1e","","/common/images/header/mainbar1_f2e.gif",1)'>
                                                <img id='mainbar1e' alt='GovHK香港政府一站通' src='/common/images/header/mainbar1e.gif'></a>
                                        </div>
                                    </td>
                                    <td class='mainbar4'>
                                        <div class='mainbar4'>
                                            <a href='javascript:comChangeLanguage("sc")' onmouseout='MM_swapImgRestore()' onblur='MM_swapImgRestore()' onmouseover='MM_swapImage("mainbar4","","/common/images/header/mainbar4_f2.gif",1)'
                                                onfocus='MM_swapImage("mainbar4","","/common/images/header/mainbar4_f2.gif",1)'>
                                                <img id='mainbar4' alt='简体版' src='/common/images/header/mainbar4.gif'></a>
                                        </div>




3.定義快速鍵



<table border="0" width="100%" cellpadding="0" cellspacing="0" summary="次選單區">
  <tr>
  <td align="right"><a accesskey= "S" href="/sitemap.asp" title="其他選單區" class="a-acceky">:::<span class="hid">其他選單區</span></a><span class="hid">[</span><a href="/sitemap.asp" title="網站導覽" class="a-bgray">網站導覽</a> <span class="hid">][</span><a href="/traffic.asp" title="交通資訊" class="a-bgray">交通資訊</a> <span class="hid">][</span><a href="/qa/online-qa.asp" title="諮詢維修服務" class="a-bgray">諮詢維修服務</a> <span class="hid">][</span><a href="http://elib.batol.net/" title="(另開新視窗)" target="_blank" class="a-bgray">華文視障電子圖書館</a> <span class="hid">][</span><a href="http://assist.batol.net/" title="(另開新視窗)" target="_blank" class="a-bgray">視障生教育輔具中心</a> <span class="hid">][</span><a href="http://www.tku.edu.tw/" title="淡江大學" class="a-bgray">淡江大學</a> <span class="hid">]</span>&nbsp;&nbsp;</td>
  </tr>
</table>



4 指定妳的語言


<li class="subItem">
<a href="/sc/" id="sc" title="简体" lang="zh-CN" class="zh-CN" rel="language-sc">简体</a> |
</li>
<li class="subItem">
<a id="langOther" href="/tc/theme/multilanguage/" title="其他語言" lang="zh-HK" class="zh-HK">其他語言 <span id="multiTriSymbol">▼</span></a>
</li>
<li><a id="govhklite" href="http://m.www.gov.hk" title="流動版" rel="govhk-lite">流動版</a></li>
<li>
<!-- note: class (font) is 'en' but lang (read) is 'zh-HK' -->
<a id="fontSizeM" title="字型大小:原設定" rel="font-size-default" class="fontSizeActive en" lang="zh-HK"><span class="access">字型大小:原設定(</span>A<span class="access">)</span></a>
<span class="access"><br></span>
<a id="fontSizeL" title="字型大小:較大" rel="font-size-larger" lang="zh-HK" class="en"><span class="access">字型大小:較大(</span>A<span class="access">)</span></a>
<span class="access"><br></span>
<a id="fontSizeEx" title="字型大小:最大" rel="font-size-largest" lang="zh-HK" class="en"><span class="access">字型大小:最大(</span>A<span class="access">)</span></a>
</li>              
                <li><a id="waMyColour_tc" href="/tc/about/style/" title="我的自訂色彩">我的自訂色彩</a></li>

5 忽略卡位圖片


</div>
<div class="cnn_adtitle">
<img width="58" border="0" height="5" alt="" src="http://i.cdn.turner.com/cnn/.e/img/3.0/global/misc/advertisement.gif">
</div>
</div>
<div class="cnn_pad18top"></div>
</div>
<!-- /cnn_maintopprofile -->


2013年12月2日 星期一

Lab 27 計算 PageRank

P(A)=0.15+0.85*(P(c))
P(B)=0.15+0.85*(0.5*P(A))
P(C)=0.15+0.85*(P(b)+0.5*P(A))


P(A)=1.163361

P(B)=0.64443

P(C)=1.19219

所以 Page-rank 是 C >A>B .

2013年11月11日 星期一

LAB 26



LAB 25



LAB 24






LAB 23









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月4日 星期一

LAB22

<html>

<form name="f" action="http://maps.google.com/maps" onsubmit="return check()" method="get">
google map:<input type="text" name="q">
<input name="send" type="submit" value="go go google">
</form>
<script>
var floatReg =/^(-?\d+)(\.\d+)?[,](-?\d+)(\.\d+)?$/;
function check()
{ if(!floatReg.test(f.q.value)){
alert("it's not correct format");
 f.q.value="";
 document.f.q.focus();
 return false;
}
 
}
</script>
</html>


LAB 21

LAB 20



LAB 19