![]() |
|
|
+ Search |
![]()
|
Apr 4th, 2008 19:52
ha mo, Tony Crosby, tony hancock,
Say you have a field,
<input type="text" name="MyField" class="Input_Type1">
You could change the class name with javascript liek so:
<script>
document.getElementById('MyField').className="Input_Type2";
</script>
This method would require the style calls in the head of your document.
<style>
.Input_Type1 {border:1px #50555A solid; background:#EEEEEE; font:12px
.Input_Type2 {border:1px #000000 solid; background:#FFFFFF; font:12px
</style>
Or, you could access the style elements directly,
<input type="text" name="MyField" style="border:1px #50555A solid;
background:#EEEEEE; font:12px">
<script>
document.getElementById('MyField').style.background='FFFFFF';
</script>
Just replace MyField with the name of the form field you want to
manipulate and "backgound" with the style element you want to change.
Not to mention changing "FFFFFF" to the desired value of the style
element.
Tony (Crosby)
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com