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

RS232C schematic diagram, Can someone provide me a scehmatic diagram of RS2...

Can someone provide me a scehmatic diagram of RS232C with explanation?

Explain hardwired control organization, Q. Explain Hardwired control organi...

Q. Explain Hardwired control organization? In the hardwired organization control unit is designed as a combinational circuit. The control unit is applied by gates, flip-flops,

Two services that are used to deal with communication, Explain about the tw...

Explain about the two services that are used to deal with communication. Message Service: Used by the application servers to change short internal messages, all system commu

State the various security tools, State the various Security Tools Sec...

State the various Security Tools Securing an Intranet is not a simple task. Just as articles in a house are protected by use of various types of security systems such as lock

What is parallel computing, Parallel computing has been a topic of interes...

Parallel computing has been a topic of interest in computing society over the previous few decades. Ever-growing amount of databases and increasing complexity of new problems are

Define general purpose register architecture, Q. Define General Purpose Reg...

Q. Define General Purpose Register Architecture? General Purpose Register (GPR) Architecture: A register is a word of internal memory similar to the accumulator. GPR architec

How would you kill a process, How would you kill a process? The "kill" ...

How would you kill a process? The "kill" command takes the PID as one argument; this signifies which process to terminate. The PID of a process can be got using "ps" command

Determine about the security policy, Determine about the Security Policy ...

Determine about the Security Policy In the United States, the government has a separate organisation looking after the security measures and providing guidelines to all departm

What is meant by the guest function, When  transferring  one  functio...

When  transferring  one  function  to  another,  what  is  meant  by  the  guest  function? A pointer to a function can be passed to another function as an argument. This allows

Rpn procedure, Apply this algorithm to your MASM program 1) Declare the ...

Apply this algorithm to your MASM program 1) Declare the following variables in your data segment: .data ; ; These are the values of the variables ; Variables

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