Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > Java Forum & Tutorial


JavaScript How To


Reply
Views: 2471  
Thread Tools Rate Thread
  #1  
Old 05-03-2009, 05:19 PM
welcomewiki welcomewiki is offline
Member
 
Join Date: Dec 2008
Location: India
Posts: 80,567
Default JavaScript How To

The HTML



The example below shows how to add HTML tags to the JavaScript:


Example








Example Explained

To insert a JavaScript into an HTML page, we use the tells where the JavaScript starts and ends:











The document.write command is a standard JavaScript command for writing output to a page.


By entering the document.write command between the tags, the browser will recognize it as a JavaScript command and execute the code line. In this case the browser will write Hello World! to the page:









Note: If we had not entered the




The two forward slashes at the end of comment line (//) is the JavaScript comment symbol. This prevents JavaScript from executing the --> tag.

Reply With Quote
Reply

New topics in Java Forum & Tutorial





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)