to add scripts into your web pages


To add scripts into your Web pages <SCRIPT>tag is used. The <SCRIPT>tag signifies the start of the script section, whereas </SCRIPT> marks the end. An example of this is demonstrated below:

<HTML>

<HEAD>

<TITLE>Working with VBScript</TITLE>

<SCRIPT LANGUAGE="VBScript">

<!--

MsgBox "Welcome to my Web page!"

-->

</SCRIPT>

LANGUAGE attribute of SCRIPT tag specifies language used for scripting. Scripts are generally placed at the top of the Web document, in HEAD. There are four 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 browser loads the page.
  • In the header of page, between <HEAD>tags. Scripts in header aren't executed immediately, though can be referred to by other scripts. Header is generally used for functions-groups of VBScript statements which can be used as a group.
  • Within an HTML tag. This is called an event handler and allows 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 completely. Not all browsers support scripting languages. To handle these browsers you can enclose your script in comment tags (<!--and -->).

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: to add scripts into your web pages
Reference No:- TGS0333116

Expected delivery within 24 Hours