Advertisement
fahmihilmansyah

js

Jun 22nd, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function loadDoc() {
  2.   var user = document.getElementById('name').value;
  3.   var password = document.getElementById('password').value;
  4.   var xhttp = new XMLHttpRequest();
  5.   xhttp.onreadystatechange = function() {
  6.     if (xhttp.readyState == 4 && xhttp.status == 200) {
  7.       document.getElementById("demo").innerHTML = xhttp.responseText;
  8.     }
  9.   };
  10.   xhttp.open("POST", "http://103.28.119.20:8080/SecurityApi/system/login", true);
  11.   xhttp.send(btoa(user + ":" + password));
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement