<%
a=100
%>
<Script> 
alert("<%=a%>")
</Script>

解决方案 »

  1.   

    <% strSQL="SELECT * FROM PUBLIC"     rstW.open strSQL,conn,1,1 %>
     var index;
     index=<%=rstW.recordset-1%>
     link = new Array(index);      
     text = new Array(index);  
     for(i=0;i<index;i++)
     {
        link[i]=<%=rstW.fields("Publink")%>
        text[i]=<%=rstw.fields("pubname")%>
        rstW.movenext
     } 
     document.write ("<marquee scrollamount='1' scrolldelay='60' direction= 'up' width='120'  height='200' onmouseover=this.stop() onmouseout=this.start()>");   
       for (i=0;i<index;i++)
      {      
      document.write ("<a href="+link[i]+" target='_blank'><font color=#cb34a2 size=2>");      
    document.write (text[i] + "</font></A><br>");      
     }      
     document.write ("</marquee>") 
     <% rstW.close %>
    </script>
    这是这一段全部代码,一运行就报错
      

  2.   

    这个打开数据库的语句在ASP中没有问题,在这就报错
      

  3.   

    是否
    strSQL="SELECT * FROM PUBLIC"     rstW.open strSQL,conn,1,1
    语句前没写:
    set rstW = Server.CreateObject("ADODB.Recordset")