Does anybody know, if i have an object like $('#input') how can I get the html that would make it up, like <input id="input" /> as a text string?
Thanks!
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.
Any of the
outerHTMLplugins, like this will work:Then just call it, e.g.:
You can give it a try here, all of those plugins use basically the same concept, clone it, stick it in a container, get the innerHTML of that container.