VBScript Where To ...
Examples
Head section
Scripts can be placed in the head section. Usually we put all the
"functions" in the head section. The reason for this is to be sure
that the script is loaded before the function is called.
Body section
Execute a script that is placed in the body section. Scripts in the body section are
executed when the page is loading.
Where to Put the VBScript
Scripts in a page will be executed immediately while the page loads into the
browser. This is not always what we want. Sometimes we want to execute a script
when a page loads, other times when a user triggers an event.
Scripts in the head section: Scripts to be executed when they are
called or when an event is triggered go in the head section. When you place a
script in the head section you will assure that the script is loaded before
anyone uses it:
<html>
<head>
<script type="text/vbscript">
some statements
</script>
</head>
|
Scripts in the body section: Scripts to be executed when the page
loads go in the body section. When you place a script in the body section it
generates the content of the page:
<html>
<head>
</head>
<body>
<script type="text/vbscript">
some statements
</script>
</body>
|
Scripts in both the body and the head section: You can place an
unlimited number of scripts in your document, so you can have scripts in both
the body and the head section.
<html>
<head>
<script type="text/vbscript">
some statements
</script>
</head>
<body>
<script type="text/vbscript">
some statements
</script>
</body>
|
Reliable, affordable, feature-rich web hosting!
Take the uncertainty out of Web hosting and let
GoDaddy.com
put service, performance and value back in. No matter which
hosting type or plan you choose, your site receives 24/7
maintenance and protection in our world-class data center. Plus,
you get the expert, friendly service you deserve, from the
world's largest hostname provider.
With three plans to choose from and
prices starting at just $4.99 per month, GoDaddy.com is sure to have a plan that's
right-sized and right-priced just for you!
All plans feature FREE 24x7 setup, FREE 24x7 monitoring, best-
of-breed routers, firewalls and servers, 24x7 onsite physical security
and access to our exclusive Go Daddy Hosting Connection, THE place
to install over 30 FREE applications. Virtual Dedicated and Dedicated
Server plans also available.
Visit GoDaddy.com today.
Virtual Dedicated, Dedicated Server and unlimited plans also available.
Save 10% on web hosting - Enter code w3tenoff at checkout
|
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|