2013年12月9日 星期一

lab29


lab28

在鏈結上加入標題

移到文字上有在顯示標題

 所有的標題上都有tiltle

建立有意義的網頁標題

反白部分表示了網頁名稱


指定妳的語言



忽略卡位圖片


定義頭字語





2013年12月2日 星期一

lab27

A引用B.C,所以A可以連到B,C
1.
PR(A)=(PR(C)/1)*0.85+0.15
PR(B)=(PR(A)/2)*0.85+0.15
PR(C)=[(PR(A)/2)+(PR(B)/1)]*0.85+0.15

2.
PR(A)=0.85PR(C)+0.15
2PR(B)=0.85PR(A)+0.3
2PR(C)=0.85PR(A)+1.7PR(B)+0.3

3.
2PR(B)= 0.7225PR(C)+0.1275+0.3
2PR(C)=0.7225PR(C)+0.1275+1.7PR(B)+0.3

4.
2PR(B)=0.7225PR(C)+0.4275
1.2775PR(C)=0.4275+1.7PR(B)

5.
34PR(B)=12.2825PR(C)+7.2625
25.55PR(C)=8.55+34PR(B)

6.
13.2675PR(C)=15.8125

7.
PR(C)=1.1918221
PR(B)=(0.7225*1.1918221+0.4275)/2=0.6442957
PR(A)=0.85*1.1918221+0.15=1.163048

8.
PR越大,PageRank越大
PageRank:C>A>B

2013年11月11日 星期一

lab26


lab25



lab24












lab23









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}\))([-\/\.])\d{3}\1\d{4}/;
      function testInfo(phoneInput){
        var OK = re.exec(phoneInput.value);
        if (!OK)
            {
 window.alert(RegExp.input + " isn't a phone number with area code!");
            q.value="";
}
        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 action="#">
      <input id="phone" name="q"><button onclick="testInfo(document.getElementById('phone'));">Check</button>
    </form>
  </body>
</html>

2013年11月4日 星期一

lab22

<html>
<title>lab22</title>
<body>
<form action="http://maps.google.com/maps" method="get" name="f" onsubmit="return check()">
<input name="q" type="text"  /><br />
<input name="send" type="submit" value="search" />
</form>
</body>
<script>

 

       
function check(){
     var floatReg =/^([+-]?)[1-9]\d*(\.\d*)?,([+-]?)[1-9]\d*(\.\d*)?$/;
         if(!floatReg.test(f.q.value)){
         
                alert("It's not a correct format");
            f.q.value="";
            document.f.q.focus();
            return false;
       
         }
}

</script>                      
</html>

lab21


lab20

lab19

2013年10月28日 星期一

lab18

<html>
<html>
<head>
</head>
<body id="body">
<form METHOD="GET" action="http://maps.google.com/maps?q=" id="exampleForm" >
搜尋<input type="text" NAME="q" id="examplePass" />
<input type="submit" VALUE="送出"/>
</form>
</body>
<script>
document.getElementById("exampleForm").onsubmit = function(){
var passwordRegex =/^[-?\d][.\d]*,[-?\d][.\d]*$/;
if(!passwordRegex.test(document.getElementById("examplePass").value)){
console.log("Regex didn't match");
alert("error");
return false;


}
};
</script>
</html>

lab17

<html>
<html>
<head>
</head>
<body id="body">
<form action="javascript:void(0);" id="exampleForm">
<input type="text" id="examplePass"/>
<input type="submit" />
</form>
</body>
<script>
document.getElementById("exampleForm").onsubmit = function(){
var passwordRegex =/^[-?\d][.\d]*,[-?\d][.\d]*$/;
if(!passwordRegex.test(document.getElementById("examplePass").value)){
console.log("Regex didn't match");
var notify = document.getElementById("notify");
if(notify === null){
notify = document.createElement("p");
notify.textContent = "error";
notify.id ="notify";
var body =document.getElementById("body");
body.appendChild(notify);
}
}
};
</script>
</html>

lab16

<html>
<html>
<head>
</head>
<body id="body">
<form action="javascript:void(0);" id="exampleForm">
<input type="text" id="examplePass"/>
<input type="submit" />
</form>
</body>
<script>
document.getElementById("exampleForm").onsubmit = function(){
var passwordRegex =/^-?\d*.\d*$/;
if(!passwordRegex.test(document.getElementById("examplePass").value)){
console.log("Regex didn't match");
var notify = document.getElementById("notify");
if(notify === null){
notify = document.createElement("p");
notify.textContent = "error";
notify.id ="notify";
var body =document.getElementById("body");
body.appendChild(notify);
}
}
};
</script>
</html>

2013年10月27日 星期日

Homework 10-21-2013

<html>
<html>
<head>
</head>
<body id="body">
<form action="javascript:void(0);" id="exampleForm">
<input type="text" id="examplePass"/>
<input type="submit" />
</form>
</body>
<script>
document.getElementById("exampleForm").onsubmit = function(){
var passwordRegex =/^-?\d*$/;
if(!passwordRegex.test(document.getElementById("examplePass").value)){
console.log("Regex didn't match");
var notify = document.getElementById("notify");
if(notify === null){
notify = document.createElement("p");
notify.textContent = "error";
notify.id ="notify";
var body =document.getElementById("body");
body.appendChild(notify);
}
}
};
</script>
</html>