| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script> | |
| function onLoad() { | |
| document.getElementById('posted-text').value = 'text-entered'; | |
| document.getElementById('form-to-submit').submit(); | |
| } | |
| </script> | |
| </head> | |
| <body onload="setTimeout(onLoad, 0);"> | |
| <form id="form-to-submit" action="posted.php" method="post" | |
| enctype="multipart/form-data"> | |
| Text to input: <input id="posted-text" type="text" name="posted-text"/><br> | |
| <input type="submit" value="Submit" /> | |
| </form> | |
| </body> | |
| </html> |