Last active
February 8, 2021 13:53
-
-
Save zlatkov/0beb9a3c5dcffc6555428fc29e832332 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | |
<script> | |
$.get('htps://example.com/api/profile', function(data) { | |
$('#username').val(data.name); | |
$('#useremail').val(data.email); | |
}); | |
</script> | |
</head> | |
<body> | |
<form method='post' action='htps://example.com/api/profile'> | |
<fieldset> | |
<legend>Your Profile:</legend> | |
<label for='username'> Name:</label> | |
<input name='username' id='username' type='text'> <br><br> | |
<label for='email' > Email:</label> | |
<input name='email' id='useremail' type='email'> <br><br> | |
<button type='submit'> Update </button> | |
</fieldset> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment