This example obtains an array of all the paragraphs in the page using document.getElementsByTagName(), then replacs the 5th paragraph. Right click to view source
This is paragraph 2
This is paragraph 3
This is paragraph 4
This is paragraph 5
This is paragraph 6
This is paragraph 7
This is paragraph 8