2014年3月24日 星期一

LAB13

<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 = /^\w+\.\w+(\.\w+)*(?=.*(edu)|(com)|(gov)|(org)|(idv)|(cc))\.w+$/;



 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 = "請打正確網址"
   notify.id = "notify";

   var body = document.getElementById("body");
   body.appendChild(notify);
  }
 }
};

 </script>
</html>

2014年3月17日 星期一

LAB12

<html>
<title>lab14</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 =/^\d*(\.\d+)?[,]\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>

LAB11

<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 = "輸入的字串是否為"整數或小數,逗號,整數或小數"
   notify.id = "notify";

   var body = document.getElementById("body");
   body.appendChild(notify);
  }
 }
};

 </script>
</html>

LAB10

<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 =/^[-+]?\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 = "輸入的字串為整數或小數"
   notify.id = "notify";

   var body = document.getElementById("body");
   body.appendChild(notify);
  }
 }
};

 </script>
</html>

LAB8_HW

<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 = /^(?=.*\d)(?=.*[\w_]).{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 much than 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>

2014年3月10日 星期一

LAB8

<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 = /^[\D]+[\W_]+[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 = "Passwoeds need to more than 6  characters long and consist of a number and non English "
notify.id = "notify";

var body = document.getElementById("body");
body.appendChild(notify);
}
}
};

</script>
</html>

LAB9


LAB7

<html>
<head>
</head>
<body id="body">
<form action="javascript:void(0);" id="exampleForm">
<input id="examplePass" type="password" />
<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 = "Passwoeds need to be  6 and 8 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>


2014年3月6日 星期四

your body language

有時候我們會從一個˙人的坐姿、走路方式,是否抬頭挺胸來判斷那個人的個性,而這到底是否正確,我們真能由此來評價一個人嗎?
從這演講中驗證,講者從動物的動作分析,當動物開心時,會頭上仰45度、舉起雙手,呈現大字形的狀態,而人也是如此,當人贏的獎勵也是舉起雙手,有人會比出V,有人會跳起來歡呼。有時我會觀察別人的坐姿,有些人是縮起來坐,有些人是翹著腳坐,有些人抱著自己膝蓋坐著,以他們做實驗,發現行為反應心理,也從這一實驗坐姿抬頭挺胸甚至翹腳的人,腎上腺皮質低睪固酮高,也許這是在興奮有自信的時候會這樣吧。
看TED可以知道很多東西,可以了解許多知識,也可以知道成功的人是如何實現理想,身體語言反映心理,成功的人也許真如研究一樣腎上腺皮質低睪固酮高,但這也給我們啟示,我們也可以從身體語言中去學習他們的動作,然後自己立定個目標去完成。

2014年3月3日 星期一

LAB4

中原
1.網頁規模 1290000
2.能見度 2513
3.教學檔案 16400
4.學術文件 11400
WR 263426.5
元智
1.網頁規模 277000
2.能見度 2562
3.教學檔案 14100
4.學術文件 2210
WR 59127.5
中正
1.網頁規模 1430000
2.能見度 5363
3.教學檔案 23500
4.學術文件 9530
WR 293636
台大
1.網頁規模 817000
2.能見度 19539
3.教學檔案 429000
4.學術文件 266000
WR 277419.5

LAB6

www.cycu.edu.tw 延遲最久元件
1.newsbox.jsp
2.runinfo.jsp
3.default+zh_TW.I.js

www.youtube.com
1.www.youtube.com
2.photo.jpg
3.cb=gapi.loaded_1

www.udacity.com
1.fonts.css 
2.udacity.min.js?4353f3facd4c92187fd07d419bgddaca6
3.eg?add=789705&t=2