1

I'm trying to replace some HTML tags in a SharePoint page with Javascript. I have the following code:

document.body.innerHTML = document.body.innerHTML.replace(/<\s*?TR\s*?><\s*?TD class=\Sms-stylelabel\S>Current Projects/gi, '<TR bgcolor:#D9D9D9><TD class="ms-stylelabel">Current Projects');    

And it appears to work; however, when I place it in the page, it doesn't. I'm wondering if there is a problem since the Current Projects section goes on a new line and has some odd tabbing/spacing. I can't change this in the SharePoint page itself. Any advice or things to try would be much appreciated!

crashcarr
  • 11
  • 2

0 Answers0