Implementation of logout page using Jqmobi to develop App Foundation

Source: Internet
Author: User

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/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.