新手求教 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>没调试,你试试看 继承问题(复合优于继承) 新手--关于myeclipse连接数据库的问题 另求推荐工具书/教程 HashMap排序实现Comparator接口 java 线程问题。。。好像是。 怎样学好AWT和Swing? Hibernate中如何取类中的前100条数据 我以为我懂了,其实我不懂!(package 问题) 请问这种情况下有什么好的安全解决方案吗?谢谢。 一个和数据库和java有关的问题 请高手解答!! 千分求书 原以为懂了,真丢脸,关于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>
没调试,你试试看