Page 75 - DCAP202_Fundamentals of Web Programming
P. 75
Fundamentals of Web Programming
Notes Self Assessment
Fill in the blanks:
7. In Javascript, ........................... tags can be inserted into three places: in between the two
BODY tags, in between the two HEAD tags, and as a link to an external file, also in the
HEAD section.
8. If your Javascript references any of the web page’s ..........................., there may be a slight
delay in the fancy effects you want to apply, or it may just not work at all.
6.5 Browsers Compatibility
Browsers that do not support JavaScript, will display JavaScript as page content. To prevent
them from doing this, and as a part of the JavaScript standard, the HTML comment tag should be
used to “hide” the JavaScript.
Just add an HTML comment tag <!— before the first JavaScript statement, and a —> (end of
comment) after the last JavaScript statement, like this:
<html>
<body>
<script type=”text/JavaScript”>
<!—
document.getElementById(“demo”).innerHTML=Date();//—>
</script>
</body>
</html>
The two forward slashes at the end of comment line (//) is the JavaScript comment symbol. This
prevents JavaScript from executing the —> tag.
Self Assessment
Fill in the blanks:
9. Browsers that do not support JavaScript, will display JavaScript as ...........................
10. Add an HTML comment tag ........................... before the first JavaScript statement, and a —
> (end of comment) after the last JavaScript statement.
6.6 Data Types
A program can do many things, including calculations, sorting names, preparing phone lists,
displaying images, validating forms, ad infinitum. But in order to do anything, the program
works with the data that is given to it.
Data types specify what kind of data, such as numbers and characters, can be stored and
manipulated within a program. JavaScript supports a number of fundamental data types.
Did u know? These types can be broken down into two categories, primitive data types and
composite data types.
68 LOVELY PROFESSIONAL UNIVERSITY