<script type="text/javascript">
$(document).ready(function()
{
$("#datetbtn").click(function(){
db.transaction(function(tx) {
tx.executeSql('SELECT * FROM materials_table ORDER BY time;',[], querySuccess);
});
});
});
</script>
function updateMaterialDB(tx) {
time = new Date();
query = 'INSERT INTO materials_table (id, material_title, type, course_id,last_accessed,) VALUES ('
+ time + '", "'
+ size + '", "'
+ is_downloaded
+ '")';
query = query.replace(/\//g,"");
console.log(query);
tx.executeSql(query);
}
这里我想使用jquery按日期显示值?这里使用查询
在行中不更改值tx.executeSql('SELECT * FROM materials_table ORDER BY time;',[], querySuccess);
});