I have the following HTML/JS code:
<!DOCTYPE html>
<html>
<body>
<input type='text' id='action' placeholder='defualt'>
<button type='button' onclick='document.getElementById("action").placeholder="it worked!"'>Change Placeholder</button>
</body>
</html>
When the button is pressed, the placeholder value of the action text input field is set to 'it worked!'
What I would like to do is make the script set the placeholder of the field whatever the user puts into it when the user presses the button. How should I do this?
document.getElementById) it appears you would know how to do that.