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 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; 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! 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
Archived
This topic is now archived and is closed to further replies.