1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<!DOCTYPE html> <html> <head> <meta charset= "UTF-8" > <title>Database Example</title> <script type= "text/javascript" charset= "UTF-8" src= "cordova.js" ></script> <script type= "text/javascript" charset= "UTF-8" > document.addEventListener( "deviceready" , onDeviceReady, false ); function onDeviceReady() { } function storeName(){ var myName=document.getElementById( "name" ).value; window.localStorage.setItem( "name" ,myName); //存储 var result=document.getElementById( "result" ); result.innerHTML= "Your name is" +window.localStorage.getItem( "name" ); //取出存储值 return false ; } </script> </head> <body> <form> <p>What is your name?<br /> <input type= 'text' id= 'name' onkeyup= 'storeName()' ></p> //键盘弹起 <input type= 'text' id= 'name' onblur= 'storeName()' ></p> //焦点移到输入框外 </form> <div id= 'result' >show content</div> </body> </html> |
下载说明
☉本站所有源码和资源均由站长亲自测试-绝对保证都可以架设,运营!
☉如源码和资源有损坏或所有链接均不能下载,请告知管理员,
☉本站软件和源码大部分为站长独资,资源购买和收集,放心下载!
☉唯一站长QQ:1004003180 [人格担保-本站注重诚信!]
☉购买建议E-mail:1004003180@qq.com 源码收购 E-mail:1004003180@qq.com
☉本站文件解压密码 【文章内都自带解压密码,每个密码不同!】