Wednesday, July 13, 2016

Add java script tag inside HTML rich text editor field in SharePoint 2013

SharePoint creates a Script Editor webpart on the page for you. It even includes an “Edit Snippet” button,

We have to add CEWP(Content Editor Webpart)
<p>All right reserved Peakfinders &copy;
<script>
var cur = 2016;
var year = new Date();
if(cur == year.getFullYear()) year = year.getFullYear();
else year = cur + ' - ' + year.getFullYear();
document.write(year);
</script>
</p>

No comments:

Post a Comment