ncthakur.itgo.com     Javascript      Phone Nepal

         NEPAL     |     ARTICLES     |     KAVITAHARU    |     MANTHAN    |     COOL LINKS    |     GUESTBOOK    |     SEARCH

JAVASCRIPT
As I have learned as a beginner:
1. Opening New Window

2. Use of Alert, Prompt & Confirm

3. Document Write

4. Use of Function

5. Event Handlers (Image Rollover)

6. If and Else Statement

7. Predefined Object (Date)

8. Cut & Paste JavaScript

NEPAL
Overview of Nepal
Map & images
Nepalese websites

KAVITAHARU
View few of my poems
written in Nepali language

ARTICLES
Articles on
crime prevention
investigation
& crime control

COOL LINKS
Computer
Travel & Tour
Police World
Downloads
Personality Test
Nepal News
Crime & Police News
Nepali Music
Health
Horoscope
Monthly Poll
Other

ADD EMAIL
Search or add email to the search list.

GUESTBOOK
View to find out what other visitors have to say about this web site.

KURAKANI
Are you interested to chat? Go to Kurakani room.

FREE E-CARDS
Enormous free E-Cards of your choice. Send it to your friend and family members.

FREE SITE SUBMIT
Submit your web site to the major search engines here.

ABOUT ME
Click here to find out about me and view few of my photographs.

 

Document Write

Within a window the HTML-document is loaded which is called a document-object. HTML-object could be a link, a form, and an image which are also the properties of a document-object.
Document : anchor, link, image, form etc

document WRITE(write something) method
<script language="JavaScript">
<!-- hide from older browser
document.write("How are you my friend?")
//-->
</script>
In this example you will see the sentence-How are you my friend?- in your document(web page).


another example
<script language="JavaScript">
<!-- hide from older browser
var test
test=document.lastModified
document.write("This page last modified:"+test) //-->
</script>

In this example you will see the sentence-This page is last modified:and the date it was modified in your web page because the code lastModified is a predefined object.


document WRITELN(writes in new line) method
<script language="JavaScript">
<!-- hide from older browser
document.writeln("You are using browser:")
document.writeln(navigator.appName+navigator.appVersion+"<BR>")
//-->
</script>
If you click on Example, you will see the Name and Version of your browser.

BACK

NEXT..........


Top

Home  | About Me  |  Nepal  |  Articles  | Kavitaharu  | Cool Links 
 Javascript  | Add Email  |  Guestbook