Add in the HTML pages VBScript code

Related Tags:

  SCRIPT Element for VBScript code will be added to the html pages. 

  <SCRIPT> Marker 

  VBScript code written in the pairs <SCRIPT> tags.    For example, the following code for a test date of the transfer process: 

   <SCRIPT LANGUAGE="VBScript"> <! - Function CanDeliver (Dt) CanDeliver = (CDate (Dt) - Now ())> 2 End Function -> </ SCRIPT>  

  Code are part of the beginning and end <SCRIPT> marker.    LANGUAGE attributes for the designated use scripting language.    The browser can use a variety of scripting language, it is necessary to specify the scripting language used.    CanDeliver attention was embedded in the Notes function marking (<!-- and - ") in.    This can not be identified to avoid <SCRIPT> marked browser will be displayed on the pages in the code. 

  Because of the example above is a generic function (not dependent on any form controls), could be included in the pages HEAD: 

   <HTML> <HEAD> <TITLE> Ordering </ TITLE> <SCRIPT LANGUAGE="VBScript"> <! - Function CanDeliver (Dt) CanDeliver = (CDate (Dt) - Now ())> 2 End Function -> </ SCRIPT> </ HEAD> <BODY> ...  

  SCRIPT block HTML pages can appear in any place (BODY head or in part).    However, the best of all the general goal of script code on the HEAD section, in order to enable all placed on script code.    This will ensure that the code in the body of the call before all script code has been read and decode. 

  These Rules a notable exception, in the form provided in the form of internal code to respond to objects in the incident.    For example, the following examples in the form of embedded script code in response to a button click in the form events: 

   <HTML> <HEAD> <TITLE> Test button events </ TITLE> </ HEAD> <BODY> <FORM NAME="Form1"> <INPUT TYPE="Button" NAME="Button1" VALUE=" click "> <SCRIPT FOR="Button1" EVENT="onClick" LANGUAGE="VBScript"> MsgBox "button is click!" </ SCRIPT> </ FORM> </ BODY> </ HTML>  

  Most script code in the Sub or Function process, only to call it other code enforcement.    However, VBScript code can be placed on the process, the block of SCRIPT.    Such codes only in the implementation of HTML pages loading time.    This can be loaded on the Web page or initialize data dynamically change the appearance of pages. 

Related articles:

Click, Home Address Add to Favorites folder (javascript)
  We all hope that their hard work produced by Home to become Internet users in the Favorites folder Dongdong, so we have been using various methods to attract the attention of users, loudly told them: "If you feel good, so I Add the Home fill your Favorites folder! "," CTRL D t...
Dreamweaver web production skills of the Application Layer
  Question: when the two are in the picture layer can be achieved, but if there is to die FLASH, that is, and will always be FLASH picture cover. How do?    On the floor Dreamweaver    Layer is the absolute position was assigned the HTML page elements - specifically, div ...
Rookie of using Dreamweaver MX 2004 act (8) to open a browser window
  Original content of this site, please specify the source of reproduced I love DivCSS.    Show - hidden layers    "Show - hidden layers" moves, hidden or restore one or more of the default visibility.    This action on the user's page with an inte...
3 hackers Google search skills
  We all know that Google is undoubtedly the world's most powerful search engine.    However, in the hands of hackers, it is a secret weapon, you can search some unexpected information.    CCID editor them a simple conclusion you do not want to use his Web site to attack...
Insert FWMX 2004 HTML Error solutions
  Fireworks MX 2004 output HTML file into Dreamweaver MX will be reported in error.    Anthony MM technical staff proposed a solution, the following steps:    1. Opened Resources Management, to find a folder: \ Program Files \ Macromedia \ Fireworks MX 2004 \ Configuration...