ICOM6034-web代写
时间:2023-07-03
ICOM6034
Website engineering
Lab 1B: JavaScript, HTML5 and CSS3
S.1
Lab 1B: JavaScript, HTML5 and CSS3
Outline of today's lab:
1) Currency conversion using JavaScript
2) Migrate to HTML5
Home exercises:
1) Tutorial on JavaScript
2) Tutorials on HTML5 and CSS3
S.2
Lab 1B: JavaScript, HTML5 and CSS3
1. Currency conversion using JavaScript
a) Download Lab1B.zip from Moodle and extract it to xampp\htdocs
b) Open your bookinfo1.html in Visual Studio Code Editor
c) Add the JavaScript code by
copy and paste the content of code3a.txt to the location
copy and paste the content of code3b.txt to the location
d) Complete the missing parts for JavaScript function
currency_translate2
which performs the currency conversion
e) Link this function to the currency select box
(Note: When you view bookinfo1.html in a browser, depending on your screen
resolution, some elements might be misplaced. If this happens, please
adjust the “zoom-level” of the browser (e.g., by using Ctrl-‘+’ or Ctrl-‘-’ in
Windows) until the entire page is properly displayed.)
S.3
Lab 1B: JavaScript, HTML5 and CSS3
1. Currency conversion using JavaScript
The missing function for the select box is
onchange="currency_translate2() "
The missing code is:
Your code should be similar to
model answer/bookinfo1_OK.html
S.4
Lab 1B: JavaScript, HTML5 and CSS3
2. Migrate to HTML5
- Go to html5_css3 folder and open bookstore.html in Visual Studio
Code editor
- Extract the web contents from bookinfo1_OK.html (from the model
answer) of Task 1 and insert into the suitable locations in
bookstore.html
- In HTML5, use the new header, nav, article, footer, section elements
instead of
elements to store the web contents
- Hint: when you copy the contents from bookinfo1_OK.html to bookstore.html,
you might preserve some of the existing class names and id’s in
bookstore.html, so that the current CSS (styles.css) can still refer to those
elements and apply the styles to them accordingly.
- Validate your new bookstore.html against HTML5 in
http://validator.w3.org/#validate_by_input
- Click “more options” and select the DocType to be “HTML5” and do
the first check and read the error messages
- Edit the source code and make changes until all validation ERRORs
are eliminated
S.5
Lab 1B: JavaScript, HTML5 and CSS3
Migrate to HTML5
- Also embed the video into the home article
We recommend to use Google Chrome to check the
result because some Firefox and Edge versions
might support the video tag differently.
The model answer can be found in the html5_css3
answer folder
S.6
b
Lab 1B: JavaScript, HTML5 and CSS3
S.7
Lab 1B: JavaScript, HTML5 and CSS3
Home exercise: tutorial on JavaScript
• The Modern JavaScript Tutorial (Part 1 & 2)
https://javascript.info/
For Part 1, you may read up to Section 5 ("Data types") if the other sections appear
difficult to you
S.8
Lab 1B: JavaScript, HTML5 and CSS3
Home exercise: tutorial on JavaScript
S.9
Lab 1B: JavaScript, HTML5 and CSS3
Home exercise: tutorials on HTML5 and CSS3
https://www.w3schools.com/html/default.asp
https://www.w3schools.com/css/default.asp


essay、essay代写