SharePoint 2013 How to add javascript to your site

In SharePoint 2013 is enriched with the Script Editor web part. The web part makes it very easy to add JavaScripts and Jquery script to your SharePoint 2013 site.

Solution

1. Edit the page where you want to use JavaScript.
2. Add the web part Script Editor.
3. Edit the web part Script Editor.

Javascript_2

4. Insert the needed Javascript, in this example the JavaScript will show the current date and time.
Javascript_3
5. Save the changes and  enjoy the result.

Result

Javascript_4

Share

9 Replies to “SharePoint 2013 How to add javascript to your site”

    1. @Ben: /_layouts/15/start.aspx# is the minimal download strategy. It seems that this feature is deactivated on the site you are testing, that’s why you are redirected to /SitePages/Home.aspx.

  1. I tried to create a new site collection using Team Site template, the behavior is still same. I think is the SharePoint version. Thanks for your reply anyway.

Leave a Reply

Your email address will not be published. Required fields are marked *