新手求教 document.write(s + "\n"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><meta http-equiv="Content-Type" content="text/html; charset=GB2312" /><title>测试</title></head><script>var db_name = "TestDb.mdb"; function connect() { var dbc = new ActiveXObject("ADODB.Connection"); var dbcon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + location.href.replace(/file:[/]+([A-Z]:.*[/])([^/]+)/,"$1")+db_name; dbc.Open(dbcon); return dbc;}function gen() { var conn = connect(); var rs = conn.Execute("select * from data "); document.open() ; var i = 0 ; while (! rs.Eof) { i ++ ; var s = rs("title").value; document.write(i) ; document.write(" " + s + "\n"); // 还是不行 rs.MoveNext ; } document.close(); rs.Close(); conn.Close();}</script><body onLoad="gen()">正在初始化系统,请稍候...</body></html> document.write(" " + s + "<br>"); 或者放在表里不是更好?<html><head><meta http-equiv="Content-Type" content="text/html; charset=GB2312" /><title>测试</title></head><script>var db_name = "TestDb.mdb"; function connect() { var dbc = new ActiveXObject("ADODB.Connection"); var dbcon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + location.href.replace(/file:[/]+([A-Z]:.*[/])([^/]+)/,"$1")+db_name; dbc.Open(dbcon); return dbc;}function gen() { var conn = connect(); var rs = conn.Execute("select * from data "); document.open() ; var i = 0 ; document.write("<table>"); while (! rs.Eof) { i ++ ; var s = rs("title").value; document.write("<tr><td>" + s + "</td></tr>"); // 还是不行 rs.MoveNext ; } document.write("</table>"); document.close(); rs.Close(); conn.Close();}</script><body onLoad="gen()">正在初始化系统,请稍候...</body></html>没调试,你试试看 关于socket聊天室 用线程池怎么实现? 再问个问题!关于ping的!!球代码! 向EXCEL写数据的问题 帮来解决一下几个问题!谢谢了.! 昨天面试碰到一个有趣的编程问题,求教高手 java中串的匹配问题(急用!) 100分求JAVA源代码!!!!!!!!!!! 想学JAVA有点烦?请大虾指点迷经... tomcat提供连接池吗? jdk1.2.2没有javac.exe,怎么用啊? 千分求书 原以为懂了,真丢脸,关于package的,请进来看看
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>测试</title>
</head>
<script>
var db_name = "TestDb.mdb"; function connect() {
var dbc = new ActiveXObject("ADODB.Connection");
var dbcon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + location.href.replace(/file:[/]+([A-Z]:.*[/])([^/]+)/,"$1")+db_name;
dbc.Open(dbcon);
return dbc;
}function gen() {
var conn = connect();
var rs = conn.Execute("select * from data ");
document.open() ;
var i = 0 ;
while (! rs.Eof)
{
i ++ ;
var s = rs("title").value;
document.write(i) ;
document.write(" " + s + "\n"); // 还是不行
rs.MoveNext ;
}
document.close();
rs.Close();
conn.Close();
}
</script>
<body onLoad="gen()">
正在初始化系统,请稍候...
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>测试</title>
</head>
<script>
var db_name = "TestDb.mdb"; function connect() {
var dbc = new ActiveXObject("ADODB.Connection");
var dbcon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + location.href.replace(/file:[/]+([A-Z]:.*[/])([^/]+)/,"$1")+db_name;
dbc.Open(dbcon);
return dbc;
}function gen() {
var conn = connect();
var rs = conn.Execute("select * from data ");
document.open() ;
var i = 0 ; document.write("<table>");
while (! rs.Eof)
{
i ++ ;
var s = rs("title").value;
document.write("<tr><td>" + s + "</td></tr>"); // 还是不行
rs.MoveNext ;
}
document.write("</table>");
document.close();
rs.Close();
conn.Close();
}
</script>
<body onLoad="gen()">
正在初始化系统,请稍候...
</body>
</html>
没调试,你试试看