【发布时间】:2011-08-31 12:30:12
【问题描述】:
我正在开发 phonegap with android。我正在创建一个登录页面。登录验证后,如果用户被授权,我想跳转到欢迎 div。
这是我的 javascript 页面:- myjavascrpt.js
var logi=item.id;
if(logi>0)
call welcome div of index.html
else
alert("invalid user");
// in this logi variable i have userid of successful user.
// now i want to
// display this id into the div which is exist in my
// html page.
// now what should i write here so i can call welcome
// div of html page and i can use
// this value of logi variable.
这是我的 index.html,我想调用它的欢迎 div。
<html>
<head></head>
<body>
<div data-role="page" data-theme="a" data-url="streaming" id="streaming">
<h1> do some thing related to streaming</h1>
</div>
**
<div data-role="page" data-theme="a" data-url="welcome" id="welcome">
<h1> you are welcome</h1>
</div>
**
</body>
</html>
所以请告诉我应该使用什么代码来调用 html 页面的 div。
【问题讨论】:
标签: javascript android html cordova