Senin, 14 Mei 2012

JavaScript How To part 2

Examples Explained

The tells where the JavaScript starts and ends:

lihat gambar 3 :

gambar 3

In this case the browser will replace the content of the HTML element with id="demo", with the current date:

lihat gambar 4 :

gambar 4

Some Browsers do Not Support JavaScript

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 (end of comment) after the last JavaScript statement, like this:

lihat gambar 5 :

gambar 5

0 comments:

Posting Komentar