robert_gsfame Posted April 11, 2010 Share Posted April 11, 2010 i have this html code <input type=checkbox name=choose[] id=check1 onselect=check()>check1 <div id=show></div> javascript function check(){ document.getElementById('show').value="aaa"; } value "aaa" didnt shown up even if i have checked the checkbox Link to comment https://forums.phpfreaks.com/topic/198189-oncheck-problem/ Share on other sites More sharing options...
void Posted April 11, 2010 Share Posted April 11, 2010 how do you want it to show up? it's value is not equal to it's content. what you are after is probably document.getElementById('show').innerHTML = 'aaa'; Link to comment https://forums.phpfreaks.com/topic/198189-oncheck-problem/#findComment-1039952 Share on other sites More sharing options...
robert_gsfame Posted April 11, 2010 Author Share Posted April 11, 2010 oopsss..sorry...i forgot that i've to use inner.HTML thx Link to comment https://forums.phpfreaks.com/topic/198189-oncheck-problem/#findComment-1039959 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.