Jquery-ui Bullet Box Login front-end notation

Source: Internet
Author: User

Create a new div:

<divclass="Container"Id="LoginForm"Hidden> class="form-signin-heading"> User login class="Form-group"> <input type="text" class="Form-control"Id="KeyName"Placeholder="Auth Key"Name="Key"> </div> <divclass="Form-group"> <input type="Password" class="Form-control"Id="PWD"Placeholder="Auth Secret"Name="Secret"> </div> <divclass="Form-group"> <buttonclass="btn Btn-large btn-primary"Id="Btnlogin"onclick="Logincheck ()"> Sign in </button> </div></div>

The frame JS notation, can be stored in the initialization:

function Showdialoglogin () {$ ("#loginForm"). dialog ({height: -, Width: $,                //Modal OpenModaltrue,                //is it possible to dragDraggable:true,                //Minimum widthMinWidth: -,                //whether the dialog box should be closed after the user presses the ESC key, which defaults to TrueCloseonescape:true            }); }

Get value Login:

function Logincheck () {varKey = $ ("#KeyName"). Val (); varSecret = $ ("#Pwd"). Val (); vardata ={key, Secret} $.ajax ({type:"Post", DataType:"JSON", URL:'/account/login', Data:data, Success:function (res) {if(Res. Message = ="Success") {                    $("#loginForm"). Dialog ('Close'); }                Else{alert ("Please re-enter"); }}, Error:function () {alert ("Please re-enter");    },        }); };

Jquery-ui Bullet Box Login front-end notation

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.