<script> function del (obj, id) { layer.confirm (' Do you want to delete information! ') , {btn: [' OK ', ' Cancel ']}, function (index, Layero) { // // judgment return Data $ (obj). Parent (). Parent (). remove (); Layer.msg ("Delete succeeded!", {icon:1, time:1000 });} ); </script><a onclick= "del (this,null)" > Delete </a>
<script type= "Text/javascript" > $(function () { //Get button click event$ ("#btnLogin"). Click (function () { varName = $ ("#form-username"). Val ();//Get user name varPWD = $ ("#form-password"). Val ();//Get Password //User name 4-bit minimum //minimum 6-bit password if(Name.length < 4) {layer.msg (' User name entered incorrectly ', {Icon:2 }); return; } if(Pwd.length < 6) {layer.msg (' Password entered incorrectly! ', {Icon:2 }); return; } //submit data to the server //input box content is a space when submitted is http://localhost/?username=%20%20%20%20%20&password=%20%20%20%20%20%20 can submit$.get ("/login/login", {name:name, pwd:pwd},function(data) {if(data = = "OK") { //Login Successful //Direct Jump PageLayer.msg ("Login succeeded", {Icon:1 }); Location.href= "/home/index"; } Else { //Logon Failure //data;Layer.msg (data, {Icon:2 }); } }); }); }) </script>
JS message box