<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
<title>Untitled Document</title>
<script language=javascript src=jquery.js>
</script>
<script runat=server-proxy>
function getTable(rows){
var a = new Array();
a[0] = rows;
var conn = new Jaxer.DB.SQLite.Connection({
PATH: "E:\\test\\sqlite\\world.db3"
});
var rs = conn.execute("Select * from [City] where id <= ?", a);
return (rs.toHTML());
}
</script>
<script language=JavaScript>
$(function(){
$("#button1").click(function(){
setdata(getTable(1000));
});
$("#button2").click(function(){
getTableAsync(setdata, 1000)
});
$("#button3").click(function(){
$("#div1").html("");
});
});
function setdata(content){
$("#div1").html(content);
}
</script>
</head>
<body>
<input type=button id=button1 value=同步方法>
<input type=button id=button2 value=异步方法>
<input type=button id=button3 value=清除>
<div id=div1>
</div>
</body>
</html>