<body> <% sub a set rs= server.CreateObject("adodb.recordset") sql = "select * from tab1" rs.open sql,conn,1,1 b = rs.recordcount %> <script language="javascript"> var b; b = <%=b%> alert(b); </script> <% end sub %> <% call a response.Write "123123" %> </body>