2014年3月10日 星期一

LAB 7

<html>
<head>
</head>
<body id="body">
<form action="javascript:void(0);" id="exampleform">
<input type="password" id="examplepass"/>
<input type="submit"/>
</form>
</body>
<script>
document.getElementById("exampleform").onsubmit=function(){
var passwordRegex = /^[A-Za-z\d]{6,}$/;
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 = "passwords need to be 6 characters long and consist of uppercase characters, lowercase characters, and digits only."
notify.id="notify";
var body = document.getElementById("body");
body.appendChild(notify);
}
}
};
</script>
</html>
大於6個字

小於6個字

LAB 9


2014年3月3日 星期一

LAB4

WR=0.2×Rank(S)+0.5×Rank(V)+0.15×Rank(R)+0.15×Rank(Sc)
台灣大學
Size:528,000+ 815,000   
Visibility:32664
Rich files:429,000
Scholar:266000
WR:389182

中正大學
Size:1,430,000+96,300=2393000
Visibility:9859
Rich files:23500
Scholar:9530
WR:488484
中原大學
Size:1,320,000 +64,300
Visibility:5,033
Rich files:16,500
Scholar:11400
WR:283561.5

元智大學
Size:277,000+61,000 =338000
Visibility:4208
Rich files:14100
Scholar:2210
WR:72150.5

由結果判斷
排名:中正>台大>中原>元智

LAB6

CYCU:   1.newsbox.jsp
               2.runinfo.jsp
               3.cse.js?cx=006671915706355032179:lepk4kd-ype

Youtube: 1.cb=gapi.loaded_0
               2.photo.jpg
               3.cb=gapi.loaded_1

Udacity:  1.fonts.css
              2.udacity.min.js?4353f3facd4c92187fd07d419bgddaca6
              3.seg?add=789705&t=2