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

What are the different types of computer networks, Q. Mention different cla...

Q. Mention different classes of computer networks (on the basis of scale) and distinguish one from the other. Ans: Local Area Network (LAN) Metropolitan Area Netw

What do you mean by execution unit, Q. What do you mean by Execution Unit? ...

Q. What do you mean by Execution Unit? Execution unit performs all ALU operations. Execution unit of 8086 is of 16 bits. It also contains the control unit that instructs bus in

Visual basic application, Name the platforms by which visual basic applicat...

Name the platforms by which visual basic applications are available? Ans) Most of the visual basic applications are available on 32 bit Intel platforms. These applications also

Discuss the classifications of switching systems, Discuss the classificatio...

Discuss the classifications of switching systems. The categorizations of switching systems are specified in the block diagram given below:

Display data in the combo box, Which property on a Combo Box do you set wit...

Which property on a Combo Box do you set with a column name, prior to setting the Data Source, to display data in the combo box? ComboBox.DataValueField = "ColumnName" When

Rsa encryption function- cryptography, The general method for constructing ...

The general method for constructing the parameters of the RSA cryptosystem can be described as follows: Select two primes p and q Let N = pq and determine ∅ (N) = (p - 1

Rational performance of an agent - artificial intelligence, Rational perfor...

Rational performance of an agent - artificial intelligence: To summarize, an agent takes input from its violence and affects that environment. The rational performance of an a

Write an interrupt routine to handle division by zero, Q. Write an interrup...

Q. Write an interrupt routine to handle 'division by zero'? This file can be loaded just like a COM file though makes itself permanently resident until the system is running.

Determine grade of service is given worse service or not, The larger the Gr...

The larger the Grade of Service, the worse is the service given, it is true or false. Ans: It is true that larger the Grade of Service, the worse service is provided.

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