Why Use JavaScript?
JavaScript enhances Web pages with dynamic and interactive features.
JavaScript runs in client software.
JavaScript 1.3 works with version 4.0 browsers.
JavaScript Syntax.
Unlike HTML, JavaScript is case sensitive.
Dot Syntax is used to combine terms. e.g., document.write("Hello World")
Certain characters and terms are reserved.
JavaScript is simple text (ASCII).
Methods of Using JavaScript.
1. JavaScripts can reside in a separate page.
2. JavaScript can be embedded in HTML documents -- in the , in the <, or in both.
3. JavaScript object attributes can be placed in HTML element tags. e.g.,
1. Using Separate JavaScript Files.
Linking can be advantageous if many pages use the same script.
Use the source element to link to the script file.
2. Embedding JavaScript in HTML.
When specifying a script only the tags and are essential, but complete specification is recommended:
3. Using JavaScript in HTML Tags.
Event handlers like onMouseover are a perfect example of an easy to add tag script.
onMouseover="document.logo.src='js2.gif'"
onMouseout="document.logo.src='js.gif'">
Practical work (continue from1 lesson). Finishing
1. Break into microgroups of 3 people each, according to the profession (by color cards)
Red Programmer.
Yellow Web Designer.
Blue Architect.
2. Each group will perform certain tasks and transfer the completed to the next. Distribute tasks in your microgroup
3. After completing all the assignments, the groups report on the work done, discuss the results of the work.
Материалы на данной страницы взяты из открытых источников либо размещены пользователем в соответствии с договором-офертой сайта. Вы можете сообщить о нарушении.