Incorporating javascript into a web page, Computer Engineering

Assignment Help:

As we already know, HTML (Hypertext Markup Language) is the language we use to create Web documents. Now we will read "Hello World!"

As given below:

<HTML>

<HEAD><TITLE>My First Page</TITLE></HEAD>

<BODY>

Hello World!

</BODY>

</HTML>

To add JavaScript to a page, you'll use a similar tag: <SCRIPT>.This <SCRIPT> tag tells the browser to start treating text as a script, and </SCRIPT> tag returns to regularly scheduled HTML as given below. Note that file will be stored as .html or .htm.

2130_INCORPORATING JAVASCRIPT INTO A WEB PAGE.png

Output of the above program would be

2111_INCORPORATING JAVASCRIPT INTO A WEB PAGE1.png

In this illustration, we placed the script within the body of HTML document. There are essentially four different places where you can use scripts:

  • In the body of page. In this case, output of the script is displayed, as part of HTML document, when the browser loads the page.
  • In the header of page, between the <HEAD>tags. Scripts in the header aren't executed immediately, however can be referred to by other scripts. Header is generally used for functions.
  • Within an HTML tag. This is termed as an event handler and allows the script to work with HTML elements. Event handlers are one kind of script where you do not need to use <SCRIPT> tag.
  • In a separate file entirely JavaScript supports use of files with.js extension containing scripts; these can be included by specifying a file in <SCRIPT> tag. This feature works only in Netscape Navigator 3.0 or later and Internet Explorer 4.0 or later.

Related Discussions:- Incorporating javascript into a web page

Explain the difference between ram and rom, RAM: Read / Write memory, High ...

RAM: Read / Write memory, High Speed, Volatile Memory. ROM: Read only memory, Low Speed, Non Voliate Memory.   RAM- Random Access memory it is a Volatile Memory.  volatil

What is building and running mpi programs, Q. What is Building and Running ...

Q. What is Building and Running MPI Programs? MPI parallel programs are written using conventional languages such as FORTRAN and C. One or more header files like 'mpi.h' may be

Non-uniform memory access model (numa), Non-Uniform Memory Access Model (NU...

Non-Uniform Memory Access Model (NUMA) In shared memory multiprocessor systems, local memories can be joined with every processor. The group of every local memories form the gl

What is clear operation, Clear operation The clear operation compares w...

Clear operation The clear operation compares words present in A and B and produces an all 0's result if two numbers are equal. This operation is achieved by the exclusive-OR mi

Determine the firewall in intranet technology, Determine the firewall in In...

Determine the firewall in Intranet technology Firewall remains the basic foundation of Internet and Intranet security, for many users getting into the corporate Intranet would

Embedded system design using c, W To date we have discussed elementary high...

W To date we have discussed elementary high level language programming and low level assembler programming, one of the benefits of C is the integration of both , this requires a re

Explain working of jaz drive, Q. Explain working of Jaz Drive? Jaz Dri...

Q. Explain working of Jaz Drive? Jaz Drive: Jaz drive is a well-liked drive with 2GB and unleashes creativity of professionals in graphic design and software development, pub

Nmknl''knl, Ask question bhjjnjnnjnjm#Minimum 100 words accepted#

Ask question bhjjnjnnjnjm#Minimum 100 words accepted#

Why smtp used as transfer protocol for web pages, Can SMTP be used as trans...

Can SMTP be used as transfer protocol for Web pages? Why? SMTP is an easy mail transfer protocol. This uses ASCII text for all communications. SMTP needs reliable delivery- the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd