本地存储Android和PhoneGap的 [英] Local storage android and phonegap

查看:90
本文介绍了本地存储Android和PhoneGap的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想存储值和检索它的PhoneGap和jQuery通过MDS鼓掌。

I was just trying to store a value and retrieve it in phonegap and jquery via mds applaud.

function sendData() {
    alert("SendData function");  
    window.localStorage.setItem("LatStore",position.coords.latitude);
    var LatValue = window.localStorage.getItem("LatStore");
    $("#LastLat").html(LatValue);

在是否2.3.5 Android的本地存储的工作。我没编译2.3.3作为目标。

Does the local storage work in android 2.3.5. I did compile with 2.3.3 as the target.

TIA
德雷德

TIA Dred

推荐答案

西蒙的评论是答案,但我不知道如何做一个评论的答案。我需要一个计算器计算器。

Simon's comment was the answer but I don't know how to make a comment an answer. I need a stackoverflow for stackoverflow.

好这个问题似乎是,位置是出在你的SendData的功能范围。如果您已送出数据一个地理位置查询的成功回调,你需要把它写成功能送出数据(位置){ - 西蒙·麦克唐纳10小时前

Well the problem seems to be that position is out of scope in your sendData function. If you have made sendData the success callback of a geolocation query you'll need to write it as "function sendData(position) {" – Simon MacDonald 11 hours ago

这篇关于本地存储Android和PhoneGap的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆