Web Analytics Made Easy -
StatCounter Display text with... - CodingForum

Announcement

Collapse
No announcement yet.

Display text with...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Display text with...

    Which HTML tag should I use if I want to display text? But I also want to access this text dynamically by the "value" attribute and display it as readonly ? (like an input tag but without the frame around the text)

    Thanks!

  • #2
    <textarea readonly="readonly" style="border:0px;"></textarea>
    Zvona
    First Aid for
    Web Design

    Comment


    • #3
      ...

      Ok thanks!

      Comment


      • #4
        there is also use of DIVs for example

        <div id="text2mod"></div>

        <script>
        text2mod.innerHTML = "this is the new text"
        </script>

        this is very usefull for changing text without having a big box around it. i used this once to make a matric style typer. scared the hell out of my sister when she thought that one of her exs had nabbed the control off her computer!
        photoshop too expensive? use the GIMP! www.gimp.org

        Comment


        • #5
          innerHTML

          This was the method I was using temporarily although it's pretty useful to use and works with IE and Mozilla 1.0, I prefer to access an object by its value attribute when it's possible because of the possible HTML tags embedded in the innerHTML (<b> for example).

          But thanks for your reply.

          Comment

          Working...
          X