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

Benefits of having densely packed integrated circuits, What are benefits of...

What are benefits of having densely packed Integrated Circuits? These are stated below: Reliability: The integrated circuit interconnections are in fact more reliable

Determine the workarounds in multiple inheritances, What are several issues...

What are several issues for selecting best workarounds in multiple inheritances? Some restrictions methods are used. Use two approaches of delegations, which is an implementati

Biscuit factory circuit, Biscuits move on a conveyer through an oven where ...

Biscuits move on a conveyer through an oven where they are cooked.   Two sensors, H and C, measure the temperature of the oven, H = 1 if the oven is too hot and C = 1 if the ove

Describe about the protection features present in ms access, If a programme...

If a programmer doesn't wish to make modifies to the document he can lock the document data and its code from more changes by changing the extension of the file system to .MDE. Cha

Quantifiers and variables - propositional model, Quantifiers and Variables ...

Quantifiers and Variables - propositional model: There is one question is arrives that 'What do sentences containing variables mean?' In other way of words, how does a first-o

Explain shift register with diagram and waveform, Q. Explain Shift register...

Q. Explain Shift register with diagram and waveform.   Q. Write a short note on Decoder.

Procedure which divides a 32-bit number by a 16-bit number, Write a procedu...

Write a procedure which divides a 32-bit number by a 16-bit number. The procedure must be general which is it's defined in one module and can be called from another assembly module

What are the properties of electronic cash, What are the properties of elec...

What are the properties of electronic cash? Properties: 1. Monetary Value: Monetary value should be backed by bank certified cashier’s cheque or cash, bank authorized cred

Projects on cluster computing, Some famous projects on cluster computing ar...

Some famous projects on cluster computing are as follows: High Net Worth Project: (developed by: Bill McMillan, JISC NTI/65 - The HNW Project, University of Glasgow, The prim

What is wap, What is WAP? WAP is stands for Wireless Application Proto...

What is WAP? WAP is stands for Wireless Application Protocol. It is a global, open standard which gives mobile users access to Internet services by handled devices. Wireless A

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