spires Posted April 9, 2009 Share Posted April 9, 2009 Hi guys. can any one tell me how to change the colour of a drop down box, once it has been changed? I'm trying to something like this: <select name="price" onchange="background-color: Black"> <option value="10">10</option> <option value="20">20</option> <option value="30">30</option> </select> Thanks for your help Link to comment https://forums.phpfreaks.com/topic/153350-onchange-change-a-drop-down-background-colour/ Share on other sites More sharing options...
Axeia Posted April 9, 2009 Share Posted April 9, 2009 Does this work? <select name="price" onchange="this.style.backgroundColor = 'Black'"> ? Link to comment https://forums.phpfreaks.com/topic/153350-onchange-change-a-drop-down-background-colour/#findComment-805717 Share on other sites More sharing options...
spires Posted April 9, 2009 Author Share Posted April 9, 2009 That's perfect. Thank you Link to comment https://forums.phpfreaks.com/topic/153350-onchange-change-a-drop-down-background-colour/#findComment-805739 Share on other sites More sharing options...
darkfreaks Posted April 9, 2009 Share Posted April 9, 2009 please mark as solved Link to comment https://forums.phpfreaks.com/topic/153350-onchange-change-a-drop-down-background-colour/#findComment-805918 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.