|
uCoz Community Archives Locked Email form change of colour |
Email form change of colour |
Yes and no...you can change it to any color you want if you customise it
but i dont know about changing it from the ucoz site Step 1: Add the below script to the <HEAD> section of your page: Code <script language="JavaScript1.2"> var highlightcolor="lightyellow" var ns6=document.getElementById&&!document.all var previous='' var eventobj //Regular expression to highlight only form elements var intended=/INPUT|TEXTAREA|SELECT|OPTION/ //Function to check whether element clicked is form element function checkel(which){ if (which.style&&intended.test(which.tagName)){ if (ns6&&eventobj.nodeType==3) eventobj=eventobj.parentNode.parentNode return true } else return false } //Function to highlight form element function highlight(e){ eventobj=ns6? e.target : event.srcElement if (previous!=''){ if (checkel(previous)) previous.style.backgroundColor='' previous=eventobj if (checkel(eventobj)) eventobj.style.backgroundColor=highlightcolor } else{ if (checkel(eventobj)) eventobj.style.backgroundColor=highlightcolor previous=eventobj } } </script> Step 2: With the above script is installed, all that's left in adding a simple onClick event handler into the <FORM> tag in question. For example:
Code <FORM onKeyUp="highlight(event)" onClick="highlight(event)"> " " </FORM> The effect can be added to more than one form on the same page. Enjoy! |
| |||
| |||
Need help? Contact our support team via
the contact form
or email us at support@ucoz.com.