2012年12月16日 星期日

Lab 32 Programming in DOM (II)

1. Open KompoZer
2. Based on the code as in

http://www.scottandrew.com/weblog/articles/dom_4 ,
write a code so that when you push a button, you generate the table of 9*9 products. (九九乘法表)

Hint: The javascript code should be enclosed by script tags.
Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。
我的按鈕名稱無法用"九九乘法表",因為會顯示亂碼,所以我只好打"click me",用英文之後就不會亂碼了。



2012年12月8日 星期六

Lab 31 Programming in DOM

1. Open KompoZer
2. Based on the code as in

http://www.scottandrew.com/weblog/articles/dom_4 ,
write a code to generate the table of 9*9 products. (九九乘法表)

Hint: The javascript code should be enclosed by script tags.






Lab 30 Create Image using DOM

1. Open KompoZer
2. Hand code a javascript that loads an image from Internet based on
the DOM model.
3. Take a look at the sample code that shows how window.onload to load the image.
4. Use a button to load the image. Try how onclick works.





Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。
程式碼都沒錯,可是圖片跑不出來,已經試過很多次了。

Lab 29 Hand code a form

Before you do this lab, you must understand what is CGI(Common Gateway Interface)  and Form.

1. So please search the answer and post your opinion in your blog.
2. Hand code a HTML or use KompoZer to edit an HTML so that the webpage can send a request to Google like
http://maps.google.com/maps?q=24.9586,+121.24114

Use Form CGI that includes action, input, and submit.
Try a few different coordinates.




Lab 28 Lab Form and Action



  • Dynamic pages, content generated by server-side programs.
  • CGI, Common Gateway Interface, for sending requests to server-side programs.


static page
Ex:
http://www.google.com/

dynamic page
Ex:
http://www.cna.com.tw/

URL that sends a request by CGI
Ex:
http://maps.google.com/maps?q=24.9586,+121.2411

Purpose of lab: 
Learn how to use Form to invoke a remote service through CGI.

1. Copy the search box of this search page,
inlcuding radio buttons, text input, and submit button.
2. Open your KompoZer HTML editor.
3. Open a new empty HTML file.
4. Paste the search box into this new file.

5. Use KompoZer to add a Form to this search box. Do not hand code the HTML. Just fill the blank in the Form dialog.

6. In the form dialog, set Action="http://google.com/search" and name of Form as "f" and method as "get"
(See Hint if it does not work.)
7. Save your file on your computer. Run your HTML by Firefox. What do you get?

8. Set method as "post"
9. Run your HTML by Firefox. What do you get?



改成get 
改成get之後搜尋cycu可以搜尋得到

改成post

改成post之後搜尋cycu',就搜尋不到了




2012年12月2日 星期日

Homework 11/26/2012

1. 在時速300km/h的高鐵上如何提供上網,2G, 3G, 4G, Wi-Fi可行嗎? 試提出可行之道。

WIFI的傳輸率最高可達54 Mbps,傳輸範圍最遠約一百公尺,然而時速最高120 km/hr時,並不可能每隔100公尺就設一個基地台,因此無法使用wifi,2G訊號勉強可傳輸,然而3G、4G更無法作用在破百之時速,2G、3G、4G和Wi-Fi都無法在高鐵上使用。
可行辦法:WiMAX是屬於IEEE 802.16標準的一種點到多點,寬頻無線存取技術。與802.11標準定義的Wi-Fi 網路一樣,WiMAX也是一種無線上網技術,只是它的訊號範圍更廣、傳遞速度更快。且WiMAX的速度、範圍分別是74Mbps、48公里,且winiMAX技術整合性高,速度快、距離遠,因此較有機會使用wimax提供上網服務。



2. 在高鐵沿線兩側部建Wi-Fi基地台(Access Point),能否解決高鐵上網問題,為什麼?

一般的無線網路則是採用 IEEE 802.11a/b/g/n,依據使用不同的技術會有不同的支援範圍與速率,但目前市面上常見的最慢也有 11Mbps(即 1.375 MB/s),平均幾乎都有支援到 56Mbps(即 7 MB/s)。但穩定的傳輸距離通常在基地台的 50 公尺以內,且對障礙物穿透力弱。然而高鐵不可能在50km內就設定一個基地台,這樣耗費成本太高。依照wifi的傳輸距離,應該不太能解決高鐵上網問題。

一般的無線網路跟手機網路所謂的 2G/3G/3.5G 走的是不同的無線射頻頻道,所以其實算是兩種不同的技術,相同的地方只是都被用來作為無線上網的媒介。打個比方,手機  2G 網路(又稱 GPRS)是走 GSM 的,所以所用的頻率範圍是 800/900/1800 MHZ 三種頻道,而無線網路則是都走 2.4GHz、5GHz 這兩種。

2012年11月26日 星期一

Lab 27 Mash-Up 2 (Calendars)

建立你的行事曆,並與學校行事曆合併 


Google日曆-中原大學服務學習活動行事曆-html版本
進入後按右下角+Google日曆即可訂閱



Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。