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

The information on the current screen, How do you find the information on t...

How do you find the information on the current screen? The information on the present screen can be found by SYSTEM ? STATUS command from any menu.

Mating - canonical genetic algorithm, Mating: Therefore once our GA ag...

Mating: Therefore once our GA agent has chosen the individuals lucky sufficient as actually there  fit enough to produce offspring then we next determine how they are going to

What is the prominence of rs232-c in serial communication, What is the prom...

What is the prominence of RS232-C in serial communication?  Name some application where you see its use.  RS-232 stands for Recommend Standard number 232 and C is the latest re

Hashing collision resolution techniques, Hashing collision resolution techn...

Hashing collision resolution techniques are a) Chaining, b) Bucket addressing

How much volts a CMOS logic device has approximately, The logic 0 level of ...

The logic 0 level of a CMOS logic device is approximately ? Ans. The low level is 0 volts approx in CMOS logic device.

How to input to circuit, Q. How to input to circuit? Register A bit...

Q. How to input to circuit? Register A bits as a0, a1, a2 and a3 in the corresponding X bits of the Full Adder (FA). Register B bits as given in the Figure above as in

The major underlying concepts of object orientation, Objects, messages, cla...

Objects, messages, class, inheritance and polymorphism are the major concepts of object orientation.

Importance of spectrum to the mobile sector, (a) The statement "Standards ...

(a) The statement "Standards create markets or markets create standards" has been the subject of considerable debate. Discuss the advantages and disadvantages to having multiple

Sap security audit log, You are required to use software of your choice (sp...

You are required to use software of your choice (spreadsheet, database, statistical package etc) to analyze the provided SAP security audit log data ( Userdata.xls ), generate appr

Io devices and i/o subsystem and direct memory access, Why IO devices canno...

Why IO devices cannot be connected directly to the system bus? Ans: The IO devices can't be directly connected to the system bus because the following reason A) The data tra

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