1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Javascript to change the colour of form background

Discussion in 'JavaScript and AJAX' started by ihatec, Nov 23, 2010.

  1. ihatec

    ihatec New Member

    Sep 1, 2010
    Likes Received:
    Trophy Points:
    Is it possible in Javascript to change the colour of form background?

    Let's say I have some text form and by default it has white background. But when I click on it I want to the colour to other one.

    I know there is an event onClick but is it also valid for such problem or I have to create my own event.
  2. shabbir

    shabbir Administrator Staff Member

    Jul 12, 2004
    Likes Received:
    Trophy Points:
    No on click event should work but if you have controls on the form you may see that clicking form elements does not work then you have to make those controls also call the same color changing JS function

Share This Page