如何使用jQuery函数访问已"序列化"的数据?
var test = $("form").serialize();
Run Code Online (Sandbox Code Playgroud)
我有这个数据......
url=hello+1&title=hello+1&content=abc
Run Code Online (Sandbox Code Playgroud)
我怎样才能获得'url'的值? - 我试过这个......
console.log(test.url);
Run Code Online (Sandbox Code Playgroud)
但我知道undefined- 我希望得到结果"hello+1"
我需要从iOS本机Objective C代码访问存储在AsyncStorage中的数据.
这需要使数据同步,而不是将App事件发送给JS,然后将其发送回本机代码.
我正在寻找在我的所有类中全局存储和读取变量的最佳方法.我知道我可以使用'singleton'但是我不确定这是否是存储我的变量的最佳方法或者如何准确地执行此操作?
我已经实施了所有购买并创建了测试用户帐户 - 但是当我来测试时; 它说我需要作为测试用户登录,显然.问题是我不确定如何登录我的"测试帐户",因为它不是技术上的官方帐户.我不确定我需要去哪里才能访问测试用户?
所以我一直试图在我的表单中按下一个按钮来调用一个函数,当它被按下时...问题是它向我报告错误说"未捕获的TypeError:undefined不是函数".
下面是我正在使用的代码......
<script>
function lookup() {
document.getElementByID("isbn").value = "FooBar";
}
</script>
<form>
<label for="isbn">ISBN</label>
<input id="isbn" type="text" name="isbn" placeholder="Enter the ISBN...">
<button type="Button" id="findButton" onclick="lookup()" >Find</button>
</form>
Run Code Online (Sandbox Code Playgroud) iphone ×2
global ×1
html ×1
ios ×1
javascript ×1
jquery ×1
jquery-1.9 ×1
objective-c ×1
react-native ×1
sandbox ×1
save ×1
testing ×1
variables ×1