-1

我是电话间隙域的新手。我想知道在电话间隙域中实现标签栏的过程。

我用 AndiDog 插件试了一下,但没有用。

请指导确切的程序....

期待 APT 解决方案

4

1 回答 1

0

好吧试试这个....

<html>

<head>

<meta name=”viewport” content=”width=320; user-scalable=no” />

<meta http-equiv=”Content-type” content=”text/html; charset=utf-8″&gt;

<title>PhoneGap</title>

<link rel=”stylesheet” href=”master.css” type=”text/css” media=”screen” title=”no title” charset=”utf-8″&gt;

<script type=”text/javascript” charset=”utf-8″ src=”phonegap.js”&gt;</script>

<script type=”text/javascript” src=”jquery.1.3.2.min.js”&gt;</script>

<script type=”text/javascript” charset=”utf-8″&gt;

$(document).bind(“deviceready”, function() {

setupToolbars();

});

var toprated=0;

var recents=0;

var history=0;

function setupToolbars() {

window.uicontrols.createToolBar();

window.uicontrols.setToolBarTitle(“A Title”);

window.uicontrols.createTabBar();

var toprated = 0;

window.uicontrols.createTabBarItem(“toprated”, “Top Rated”, “tabButton:TopRated”, {

onSelect: function() {

navigator.notification.alert(“Top Rated selected”);

window.uicontrols.updateTabBarItem(“toprated”, { badge: ++toprated });

}

 });

var recents = 0;

window.uicontrols.createTabBarItem(“recents”, “Recents”, null, {

onSelect: function() {

navigator.notification.alert(“Recents selected”);

window.uicontrols.updateTabBarItem(“recents”, { badge: ++recents });

}

});

var history = 0;

window.uicontrols.createTabBarItem(“history”, “History”, “icon.png”, {

onSelect: function() {

navigator.notification.alert(“History selected”);

window.uicontrols.updateTabBarItem(“history”, { badge: ++history });

}

});

window.uicontrols.createTabBarItem(“search”, “Search”, “tabButton:Search”);

window.uicontrols.createTabBarItem(“downloads”, “Downloads”, “tabButton:Downloads”);

window.uicontrols.showTabBar();

window.uicontrols.showTabBarItems(“toprated”, “recents”, “history”);

}

</script>

</head>

<body id=”stage”&gt;

<div id=”Page1″&gt;

<br><br><br>

<h1>The tab bar is kewl!</h1>

</div>

</body>

</html>
于 2013-02-25T08:39:44.943 回答