<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<table width="70%" border="0" align="center" cellpadding="1" cellspacing="1" class="table_bg" onMouseMove="showMsg();">
<tr>
<td align="center" colspan="2" class="td_content">用JScript写ASP测试</td>
</tr>
<%
var rs,conn,ConnStr;
rs=Server.CreateObject("adodb.recordset")
conn=Server.CreateObject("Adodb.connection")
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " + Server.MapPath("test.mdb");
conn.open (ConnStr);
rs.open ("select * from item",conn,1,1);
for (i=0; i<10; i++)
{
Response.Write("<tr>");
Response.Write(" <td class=td_content><a href=?id=s"+ rs("ID")+" οnclick=showID("+rs("ID")+");>"+rs.Fields(2)+"</a></td>");
Response.Write(" <td class=td_content> </td>");
Response.Write("</tr>");
rs.MoveNext;
}
rs.Close;
rs=null;
var vNow = new Date();
Response.Write("<br>今天是" + vNow.getDate() + "号");
%>
</table>
ASP还可以这样写!
最新推荐文章于 2021-12-13 08:00:00 发布