我可以使用java脚本直接从数据库中获取数据。
像
这样的东西var results = conn.query("select * from table");
然后在我的html中使用
document.innerHtml(results[0]['name']);
答案 0 :(得分:0)
YES. You can do it - you can query some database engines directly from Javascript. But you almost never do it, because in AJAX model you have thin clients with no fast access to database engine.