Logout can actually use a basic a tag.
For example, I put login and logoff in the bottom navigation bar navbar.
Basic code:
<div id= "NavBar" >
<a href= "#home" id= ' navbar_home ' class= ' icon home ' > Homepage </a>
<a href= "# Login "id= ' loginlink ' class= ' icon home ' > Login </a>
<a id= ' logoutlink ' class= ' icon home ' > Logoff </a >
<a href= "#about" id= ' navbar_picture ' class= ' icon picture ' > About us </a>
</div>
JS Code:
function Logoutfun () {
$.ui.popup ({
title: prompt), message
: "OK logout",
canceltext: "Cancel"
, Cancelcallback:function () {},
Donetext: OK,
donecallback:function () {Logoutsurefun ()},
cancelonly:f Alse
});
function Logoutsurefun () {
var url = serviceurl + "Uiphoneajax/getdata.ashx?type=logout";
$.post (URL, NULL, function (res) {
if (res). issuccess) {
$ ("#loginlink"). Show ();
$ ("#logoutlink"). Hide ();
else {
$.ui.popup (res. MSG);
}
, "JSON", function () {$.ui.hidemask (); $.ui.popup ("Network Connection failed! "); })
}
Implementation effect:
When you need to be aware, use this pop-up to add the relevant plug-ins af.popup.js
Author: csdn Blog xuexiaodong2009
Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/