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

Pruning - artificial intelligence, Pruning - artificial intelligence: ...

Pruning - artificial intelligence: Recall which pruning a search space means deciding that there certain branches to should not be explored. Moreover if an agent knows for sur

Explain the page stealer and the fault handler, How the Kernel handles both...

How the Kernel handles both the page stealer and the fault handler? The page stealer and the fault handler thrash because of the shortage of the memory. If the sum of the worki

Programming, how can compare alphabates of two words in c programming ?????...

how can compare alphabates of two words in c programming ?????

Define mercantile process model from perspect of merchant, Define Mercantil...

Define Mercantile Process Model from the Merchant’s perspective along with a suitable diagram. This model consists of three activities into the purchase consummation phase: Aut

Explain what are video and graphic in multimedia application, Question: ...

Question: (a) Copying a graphic image from the Web will be as easy as pointing to it and clicking the right mouse button or performing a screen capture. The question is, under

Give the sequence of procedure calls for server and client, Give the sequen...

Give the sequence of procedure calls for both server and client for connect ion-oriented application.   In connection oriented communication the order of Procedure call

Derive the expression of traffic capacity, Traffic Capacity is given by? ...

Traffic Capacity is given by? Traffic Capacity = Switching capacity × Theoretical maximum load.

What are the components of i-way infrastructure, What are the components of...

What are the components of I-way Infrastructure? There are three components of the I-way infrastructure: • Consumer access equipment • Local on-Ramps • Global informat

An example of the subscriber traffic in erlangs, A subscriber makes three p...

A subscriber makes three phone calls of 3 minutes, 4 minutes and 2 minutes duration in a one hour period. Calculate the subscriber traffic in erlangs, CCS and CM. Subscriber tr

What do you mean by parallel virtual machine, Q.What do you mean by Paralle...

Q.What do you mean by Parallel virtual machine? PVM is essentially a simulation of a computer machine running parallel programs. It is a software package which allows a heterog

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