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

Significance of xml in edi and electronic commerce, What is the significanc...

What is the significance of XML in EDI and electronic commerce?   XML has been defined as lightweight SGML XML shows great promise for its inherent ability to permit a " doc

Discuss in detail about the computers and supercomputers, Discuss in detail...

Discuss in detail about the Computers and supercomputers Computers are classified with respect to their size, cost and speed as supercomputers, servers, embedded computers and

Define smtp, SMTP Simple Mail Transfer Protocol, a protocol for sending...

SMTP Simple Mail Transfer Protocol, a protocol for sending e-mail messages among servers. Most e-mail systems that send mail over the Internet use SMTP to send messages from si

Explain the typical functions of operating systems, List the typical functi...

List the typical functions of operating systems. Classical functions of operating system are given as: (1) Process management: A process is a program throughout execution.

Representation of real-system, Maria opened her authentic Mexican restauran...

Maria opened her authentic Mexican restaurant MiCazuela in Tucson inthe 1980s. It quickly became popular for the tasty food and use of fresh organicproduce and all-natural meats. L

Information distribution, INFORMATION DISTRIBUTION: The organization and m...

INFORMATION DISTRIBUTION: The organization and management of any institution, be it an isolated lab or a large site with many labs, requires that information is managed. Methods o

Artificial life - artificial intelligence, Artificial Life - artificial int...

Artificial Life - artificial intelligence: Give birth to new exits forms.  A swot of Artificial Life will certainly direct on what it means for a complex system to be 'aliv

Define digital computers system, Q. Define Digital computers system? Di...

Q. Define Digital computers system? Digital computers, in general, are automatic machines that accept data and instructions, perform predefined operations very quickly on the d

In ldb what determines hierarchy of the tables, In LDB what determines hier...

In LDB what determines hierarchy of the tables? Structure

Conjunctive normal form -artificial intelligence , Conjunctive Normal Form ...

Conjunctive Normal Form -artificial intelligence : For the resolution law to determine two sentences, they should both be in a normalized format known as conjunctive normal fo

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