Tweaking your Community

:)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

You are not connected. Please login or register

VBScript How to?

Go down  Message [Page 1 of 1]

1VBScript How to? Empty VBScript How to? Sun May 02, 2010 8:38 am

sir.penney

sir.penney
Administrator
Administrator

The HTML tag is used to insert a VBscript into an HTML page.
Put a VBscript into an HTML Page

The example below shows how to use VBSript to write text on a web page:
Example (IE Only)



document.write("Hello World!")




Try it yourself »

The example below shows how to add HTML tags to the VBscript:
Example (IE Only)



document.write("

Hello World!

")




Try it yourself »

Example Explained

To insert a VBscript into an HTML page, we use the tag. Inside the tag we use the type attribute to define the scripting language.

So, the and tells where the VBscript starts and ends:



...




The document.write command is a standard VBscript command for writing output to a page.

By entering the document.write command between the and tags, the browser will recognize it as a VBscript command and execute the code line. In this case the browser will write Hello World! to the page:



document.write("Hello World!")




How to Handle Simple Browsers

Browsers that do not support scripting, will display VBscript as page content.

To prevent them from doing this, the HTML comment tag should be used to "hide" the VBscript.

Just add an HTML comment tag (end of comment) after the last VBscript statement, like this:






Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

 



iJerick | Forumotion | Punbb | jQuery | CSS3
Copyright © 2011 TweakGround™. All Right Reserved.

Forum free | ©phpBB | Free forum support | Report an abuse | Forumotion.com