vbscript syntax in asp classic
I have a vbscript that I want to run in the <head>
of an asp. I am having trouble getting the script to run so I'm thinking I need some help making sure the asp knows that it's vvbscript or something. The last script is the one I am having trouble 开发者_StackOverflowrunning.
here is what I have:
<%@ Language=VBScript %>
<%
***vbscript***
%>
<HTML>
<HEAD>
<link rel="stylesheet" href="MD_intstyle.css" type="text/css">
<SCRIPT Language="JavaScript">
***javascript***
</script>
<script language="vbscript">
***vbscript I am trying to run***
</script>
</HEAD>
Change:
<script language="vbscript">
***vbscript I am trying to run***
</script>
To:
<%
***vbscript I am trying to run***
%>
AS(erver)P runs on the server and therefore you cant tell the client to run the code as vbscript with HTML-tags. Start your ASP code with the start tag <% and the close tag %>. Just as you do on the top in your example.
use runat="server" in script tag.
<script language="vbscript" runat="server">
***vbscript I am trying to run***
</script>
精彩评论