How do I create the following markup using JavaScript’s document.createElement function?
<input type="hidden" value="" id="" />
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is some code to create your input box:
To add it to a
<form>withid="myform"you could do this:FYI: Your
<input>doesn’t have anameattribute. If you’re planning on submitting it as part of a form and processing it on the server side, you should probably include one.