Click here to Skip to main content
15,891,837 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Guys,
I am new to VB Script. I am using the below piece of code as a start but i am getting Error. Please help me


HTML
<html>
   <body>  
      <script language="vbscript" type="text/vbscript">
         document.write("Hello World!")
      </script>
   </body>
</html>
Posted
Updated 20-Nov-15 23:22pm
v2
Comments
Patrice T 21-Nov-15 5:22am    
Have you done most basic research on Google ?
satish ranjan 21-Nov-15 5:24am    
Yes sir, i tried all possible ways to resolve it, but still i get the same Error. Please help me to resolve this Issue.
satish ranjan 21-Nov-15 5:27am    
I Get Error as Expected statement at Line 1, still I am unable to figure out what is the Error
Patrice T 21-Nov-15 5:36am    
The error message matters, you should have gave it in question.

1 solution

You read http://www.w3schools.com/asp/vbscript_default.asp[^]
you should try:
HTML
<html>
   <body>  
      <% document.write("Hello World!") %>
   </body>
</html>
 
Share this answer
 
Comments
satish ranjan 21-Nov-15 5:44am    
Hello Sir,
Still i get the same Erorr as below, I have modified the changes as you have given below.

Just to inform you i am writing this in Notepad++ and selecting language as VB. Then i save the file as .vbs extension. After this i double click on .vbs File then i get the below Error

Line : 1
Char : 1
Error: Expected statement
Code : 800A0400
Source : Microsoft VBScript compilation Error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900