Jump to content

Write html code in <input type='text'>


volterra79

Recommended Posts

Hi all,i have a question: I create a variabel as: html = "<input type='text' name='FirstName' value="+code+" />" where code is a html code as: code = <p>My first paragraph.</p> How can write html code as text inside a html code? Thank Francesco

  • Like 1
Link to comment
Share on other sites

You can use HTML entities:

value="<p>My first paragraph.</p>"

Here's a list of the main entities you'll need to escape:< = <> = >" = "' = '& = &

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...