希望你有 一个很好的一天,我怎么可以插入本地存储的值到数据库中,这里是我使用插入本地存储值插入数据库
function fun() {
var count = localStorage.getItem("count") || 0;
localStorage.setItem("count", ++count);
}
function result() {
document.write("your mark is " + (localStorage.getItem("count") || 0) + " from 9")
}
function clear(){
window.localStorage.clear();
}
代码我想插入变量数值到数据库中..有可能吗?
使用REST创建写入到数据库服务,然后从JavaScript越过localStorage.getItem调用服务(”计数“)作为参数之一。我确定有一个更简单的方法。 –
[HTML5 localStorage数据库使用类似于JSON格式的推动者](https://github.com/joaoN1x/DBosta.js) – deadman
**是**这是可能的! –