ev5unleash Posted April 18, 2009 Share Posted April 18, 2009 Hi everyone, I'm not that good with Javascript but let me tell you what I'm trying to do. I'm trying to make a button that will make a color code in a textbox as the background color. Could someone help me with what the onClick action should be for the button? Thanks! http://ev5unleash.dnsalias.org:1212/bgtest.htm Quote Link to comment https://forums.phpfreaks.com/topic/154592-solved-background-color-picker-background-button/ Share on other sites More sharing options...
Axeia Posted April 18, 2009 Share Posted April 18, 2009 document.body.style.backgroundColor = document.getElementById('txt').value; Quote Link to comment https://forums.phpfreaks.com/topic/154592-solved-background-color-picker-background-button/#findComment-813092 Share on other sites More sharing options...
ev5unleash Posted April 18, 2009 Author Share Posted April 18, 2009 Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/154592-solved-background-color-picker-background-button/#findComment-813160 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.