Created
February 14, 2021 06:45
-
-
Save anmolsukki/821a0321bf9c83383fcbc541340f336b to your computer and use it in GitHub Desktop.
This file contains 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
var form = document.createElement('form'); | |
var element1 = document.createElement('input'); | |
var element2 = document.createElement('input'); | |
var element3 = document.createElement('input'); | |
form.method = 'POST'; | |
form.action = response.data.url; | |
element1.value = response.data.Name; | |
element1.name = 'name'; | |
element1.type = 'hidden'; | |
form.appendChild(element1); | |
element2.value = response.Mobile; | |
element2.name = 'mobile'; | |
element2.type = 'hidden'; | |
form.appendChild(element2); | |
element3.value = response.data.Email; | |
element3.name = 'emaol'; | |
element3.type = 'hidden'; | |
form.appendChild(element3); | |
document.body.appendChild(form); | |
form.submit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment