can u change the color background of a text box when it has been changed/edited by the user?

E

Evertjan.

libsfan01 wrote on 14 apr 2006 in comp.lang.javascript:
How/can you do this?

[Please always repeat your question in the text and do not use sms
shortenings on usenet]
"can u change the color background of a text box when it has been
changed/edited by the user?"

<style>
input { background-color:expression(value!=defaultValue?"cyan":"");}
</style>

This is IE-only.

=============================================

cross browser:

<input
value='start'
onkeyup='this.style.backgroundColor=
(value!=defaultValue)?"cyan":""'>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top