2008年12月29日 星期一
Quiz 01-05-2009
2. 請撰寫一段DOM小程式。
3. XML 跟 JavaScript 有任何關聯嗎? 如果有關聯請舉例說明。如果沒有,請說明為什麼?
4. AJAX 包含哪些技術?
5. 說明Packet sniffer 的原理
6. 說明 SiteMeter 原理
7. 為什麼要做網站的Stress Test?
8. 解釋Web2.0是甚麼
9. 請寫一段XML
10. 請寫一段XSLT
11. 無障礙網頁技術有哪些?
12. 如何增加網頁的互動性?
2008年12月25日 星期四
Lab Web Stress Test
2. Take a look at the user manual.
3. Test a static page.
Try combinations of stress levels and stress multipliers to simulate 10 users and 100 users.
4. Test a dynamic page.
Try combinations of stress levels and stress multipliers to simulate 10 users and 100 users.
5. Compare the response time of both pages and explain why.
Lab Site Traffic Metrics
2. Put a Sitemeter in your own blog.
2. Check the site meter to see the daily traffic chart, the recent visitors by locations.
Lab: Packet Sniffer
2. Capture the packets at your Ethernet interface card.
3. Enter a login required website that you often go to, such as web mail. Don't use the real account or password.
4. Try to catch the packet that contains the password.
第二次小考,1/5/2009
方式: closed book, no computer
歷年考題(僅供參考,題型可能變更)
小考目的主要在測驗學生基本能力,能夠面對問題,獨立去構思答案,不假他人既有成果。因此,不必求完美,只要掌握關鍵概念,就會給予高分。
2008年12月22日 星期一
Lab: Drag and Drop
2. Study and play around the "drag-and-drop" example.
3. Use this method to control movie playing as in the previous lab.
4. If you drag and drop the photo to the "play" area, the movie plays.
5. If you drap and drop the photo to the "pause" area, the movie pauses.
Lab: Movie Player
2. Study and play around the "scripting" and "video" examples.
3. Use this script to control movie playing.
4. If you push the "pause" button, the movie pauses.
5. If you push the "resume" button, the movie resumes.
2008年12月15日 星期一
Lab DOM
1. Open NVu
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.
2008年12月8日 星期一
Lab Create Image using DOM
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.
DOM, Document Object Model
web personalization 網頁個人化
你會不會覺得有點神奇, 它是如何做到的?
關鍵就在 DOM.
With the DOM scripting methods you can:
- Create new elements on the fly.- Grab all the tags of the document, or grab the text without grabbing the tag text.
- Insert new text, and change or remove text from any element.
- Move whole parts of the document around, or remove parts as fragments and work with them.
- And the best part: all of these new methods should work in any DOM compliant browser. No more browser sniffing. No need to build different versions of the same page for different browsers.
Reference:
Scripting For The 6.0 Browsers, By Scott Andrew LePera
createElement() allows you to create a new tag.
myImg = document.createElement("IMG")
Give definition.In the above example, our newly born tag has no ID, no SRC and no home in the document yet. So let's give it some definition:
myImg.setAttribute("id","imageOne")
myImg.setAttribute("src","jabberwocky.gif")
Append it within the document "tree".
Now all we need to do is append it to the document body. And to do that, we use the DOM node method appendChild():
docBody = document.getElementsByTagName("body").item(0)
docBody.appendChild(myImg)
Lab XML
2. Open the XML file by Word and you will see the document structure.
3. View the formatted HTML file.
2008年12月1日 星期一
Lab XML (2)
2. Given the
Listing 1. An XML document representing the results of a soccer tournament
Listing 2. A basic style sheet for the soccer results
use the XSLT as in the Listing 2 to transform the XML file as in the Listing 1.
(archive)
3. View the formatted HTML file.
4. Given the
Listing 1. An XML document representing the results of a soccer tournament
Listing 3. A style sheet that computes team standings
compute the team standings in a table.
5. View the formatted HTML file.
XML
Take a look at islandwide temperatures of Taiwan.
What happens if you just want Taoyuan's temperature?
If you want to include Taoyuan's temperature in your Theme
Park homepage, is there any solution?
XML examples:
- News Syndication
- http://140.135.8.178/bgbg
/lihung.html
Input 2008 4 7 8 55
the need of XML
- HTML for machine-human interaction
- XML can be formatted to HTML according to formartting rules called XSLT. To see it, do Lab XSLT.
- XML for machine-machine interaction
- Without human involvement, automation of business systems can be accelerated.
- An XSLT style sheet is an XML document.
- The basic processing paradigm is pattern matching.
Operation of an XSLT Processor
參考資料
XSLT(專業ASP.NET XML程式設計 - 使用C#)