Show the InnerHTML of each Paragraph with Style
javascript:(function()
{
var report;
var theParagraphs = document.getElementsByTagName("P");
var i;
for (i = 0; i < theParagraphs.length; i++)
{
theParagraphs[i].style.backgroundColor = "aqua";
theParagraphs[i].style.fontWeight = "bold";
theParagraphs[i].style.color = "black";
report += theParagraphs[i].innerHTML;
report += "\n";
}
alert(report);
}());
{
var report;
var theParagraphs = document.getElementsByTagName("P");
var i;
for (i = 0; i < theParagraphs.length; i++)
{
theParagraphs[i].style.backgroundColor = "aqua";
theParagraphs[i].style.fontWeight = "bold";
theParagraphs[i].style.color = "black";
report += theParagraphs[i].innerHTML;
report += "\n";
}
alert(report);
}());