Skip to content

Instantly share code, notes, and snippets.

@l02162010
Last active May 5, 2016 10:15
Show Gist options
  • Save l02162010/f0dbd90126bce88f391f00b544b2d452 to your computer and use it in GitHub Desktop.
Save l02162010/f0dbd90126bce88f391f00b544b2d452 to your computer and use it in GitHub Desktop.
$(document).ready(function () {
var vieClick = $('#vieClick');
var account = $('#account');
var password = $('#password');
//var accountFile = $('#account').val(); //放外面,裡面的account:accountFile吃不到
//var passwordFile = $('#password').val(); //同上
//所以要放裡面
vieClick.click(function () {
viaing.show(); //出現驗證中
var accountFile = $('#account').val();
var passwordFile = $('#password').val();
console.log('QQ'+accountFile);
$.ajax('/user/register/stu',{
method: 'POST',
data: {account:accountFile,password:passwordFile},
error: function(jqXHR,textStatus,errorThrown) {
console.log(error);
},
success: function(result){
console.log(result);
console.log(accountFile);
}
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment