Friday, 14 March 2014

Add Javascript in SharePoint Webpart page

Add Javascript in SharePoint Webpart page
Add new webpart page
Open that page using SharePoint designer
Search for : PlaceHolderAdditionalPageHead
You will find
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
....
...
..
</asp:Content>
Before closing </asp:Content> tag
Add below script
<script type="text/javascript" src="jquery-1.9.1.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
alert('Test');
});
</script>
Save
preview