借花献佛:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>我的精品收藏夹</title>
</head>
<script>
/** 公用变量 **/
var db_name = "netBook.mdb"; // Access数据库名/**
 * 函数: connect
 * 功能: 连接 Access 数据库
 * 返回连接
 * 要求数据库文件在本文档一起
 */
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;
//  var dbcon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" + 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 manage where type='netBook'");
var s = rs("content").value;
rs.Close();
conn.Close();
document.open("text/html", "replace");
document.write(s);
document.close();
}
</script>
<body onLoad="gen()">
正在初始化系统,请稍候...
</body>
</html>