星期五, 5月 25, 2007
Lab DOM and JavaScript
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 Create Img using DOM
2. Hand code a javascript that loads an image from Internet based on
the DOM model.
3. Use window.onload to load the image.
4. Use a button to load the image. Try how onclick works.
Hint: The javascript code should be enclosed by script tags.
Reference: DOM (Document Object Model)
星期五, 5月 18, 2007
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)
Homework 5-18-2007
2. 閱讀兩篇有關網站行銷效益評估的論文,撰寫500字到1000字心得。
3. Read the introduction of DOM.
CGI
(page 188~193 of Text)
URL that sends a request by CGI
http://maps.google.com/maps?q=24.9586,+121.2411
Lab Form and Action, Part II
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 Form and Action
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 Nvu HTML editor.
3. Open a new empty HTML file.
4. Paste the search box into this new file.
5. Use Nvu 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. Run your HTML by Firefox. What do you get?
8. Set method as "post"
9. Run your HTML by Firefox. What do you get?
星期五, 5月 11, 2007
Homework 5-11-2007: XSLT Part II
and use Xray to generate an HTML that contains the titles of items in the RSS.
2. View the formatted HTML file.
星期六, 5月 05, 2007
聯電暑期工讀計畫
聯電響應本系所提出之產業實習課程
擬提供1-3名的名額於本系所大學部與研究生,並已規劃好實習期間安排的學習課程。(請參閱附件)
實習期間為7/2~8/31約兩個月時間,學生需自行安排住宿
中原大學實習生工作計劃-2007
實習生課程-2007
星期五, 5月 04, 2007
Homework 5-4-2007
1. Do
Lab: Webpage Accessibility, Part II
2. Reading Assignments:
XML (Page 187-188 on the Textbook)
3. Do
Lab: Valiadating PageRank
Introduction to 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:
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
Lab: Webpage Accessibility, Part II
Look for the differences you have made after doing Step 4 & Step 5.
7. Save your editings again and preview your webpage using Firefox
8. Download web accessibility validator Freego
9. Use Freego to examine whether your webpage is accessible.
須通過第一級機器檢測
星期四, 5月 03, 2007
Lab Webpage Accessibility
at http://maplepoem.blogspot.com/2005/03/blog-post_111070085865304732.html
1. You can copy and paste the content to your Nvu.
2. Take a look at the HTML 標籤, HTML 原始碼
3. Save your editings and preview your webpage using Firefox
4. Create a clickable link at the term 中原大學 so that
this link goes to http://www.cycu.edu.tw
5. Make the webpage accessible by
(1) adding ALT text to the images and
(2) adding a title to the URL link at Step 4.