jaymc Posted October 29, 2007 Share Posted October 29, 2007 What is the best way to add a line of data at the bottom of a div <div> line 1 line 2 line 3 line 4 line 5 line 6 line 7 line 8 </div> How can I add 'line 9' after line 8 I want to avoid using (GET THE INNER HTML, ADD 'LINE 9' to it, THEN ADD ALL THE CONTENT BACK IN THE DIV) The reason being, there may be up to 1000 lines of data in a div and I will be adding new lines every 20 seconds so may not be very practical Whats the best way? Link to comment https://forums.phpfreaks.com/topic/75274-solved-add-content-at-bottom-of-div/ Share on other sites More sharing options...
fenway Posted October 30, 2007 Share Posted October 30, 2007 Use the DOM function and create a new element at the "end" of the current element. Link to comment https://forums.phpfreaks.com/topic/75274-solved-add-content-at-bottom-of-div/#findComment-381109 Share on other sites More sharing options...
jaymc Posted October 30, 2007 Author Share Posted October 30, 2007 Can anyone provide an example? Edited: Ahh ok I've found it http://www.javascriptkit.com/javatutors/dom2.shtml Link to comment https://forums.phpfreaks.com/topic/75274-solved-add-content-at-bottom-of-div/#findComment-381262 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.