takn25 Posted April 29, 2011 Share Posted April 29, 2011 Hi, I am stuck at this place could some one guide me. For instance I can get the element by id but there are about 10-20 buttons with different Ids and Values so I want to know can I get the element by something that works for all the buttons. 'text='+document.getElementById('8').value; <button type='submit' value='8' id='8' onclick="insert();"/> </button> The value and id differ from each other there is another button with different ids and values. So is there something I can come up with that will work for all the buttons? <button type='submit' value='9' id='9' onclick="insert();"/> </button> Link to comment https://forums.phpfreaks.com/topic/235113-getelementby/ Share on other sites More sharing options...
gizmola Posted April 29, 2011 Share Posted April 29, 2011 Don't post the same question multiple times. I answered the question in the other thread. http://www.phpfreaks.com/forums/index.php?topic=331809.0 Link to comment https://forums.phpfreaks.com/topic/235113-getelementby/#findComment-1208374 Share on other sites More sharing options...
Recommended Posts