Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function login()
- {
- var req;
- if(window.XMLHttpRequest){
- req = new XMLHttpRequest();
- }else if (window.ActiveXObject) {
- req = new ActiveXObject("Microsoft.XMLHTTP");
- }
- var namevalue= document.getElementById("username").value;
- var passvalue= document.getElementById("password").value;
- alert(namevalue);
- alert(passvalue);
- var data;
- $.ajax({
- type: "GET",
- url: "api/user/login.php",
- data: "?username="+namevalue+"&password="+passvalue,
- success: function(data) {
- alert(data);
- }
- });
- }
Add Comment
Please, Sign In to add comment