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>

2013年10月6日 星期日

Homework 9-30-2013

1.在過去有許多不同的電腦有不同的格式,不能相容,資訊不能傳遞,發明了網際網路,讓資訊可以互通,後來透過超連結,讓人可以輕易的在尋找資訊的時候,透過相關的連結,尋找更多有關聯的資料,人們應該要有Raw Data Now的概念,原始資料是很重要的,避免被隱藏了甚麼資訊,網站應該要可以分享資料給另一個網站,如果每個人都在一個網站上提供一些資料,久而久之,這個網站便可以提供資料給每一個可能需要的人,例如演講者在地圖上標示地名一般.

2.在龐大的資料量下,提供簡易快速的方法以搜尋網際網路上的資訊

3.Mark Zuckerberg缺乏與人交往的能力,所以他設計了facebook希望能認識女孩子

4.一套共同的系統,讓電腦與電腦之間可以互相聯結

5.很多學校的很多文章都不在上面