HTML element to use as a Javascript message display

Posted by javanix on Stack Overflow See other posts from Stack Overflow or by javanix
Published on 2010-04-27T23:49:48Z Indexed on 2010/04/27 23:53 UTC
Read the original article Hit count: 275

Filed under:
|

I have a message display field on my website that I'd like to change the value of via JS.

I've been using just a textfield, disabling it, and modifying the value via a JS function (after using a little CSS to make it not look like a text field):

<input type="text" id="message" style="background: white; color: black" size="50" disabled>

There has to be a better way (for instance, formatting is tricky whenever the message runs over the specified size), but I can't think of it off the top of my head. Can anyone point me in a better direction? Thanks!

FYI: I am doing a timer function which I'd like to look something like "HH:MM:SS | 'my message here'"

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about textbox