If you have a SharePoint list and you want to insert item to that list, you have to write the code below in a script editor web part.
var clientContext = new SP.ClientContext("http://win-pfcp2dgt8di/sites/EnjoySharePoint/");
var oList = clientContext.get_web().get_lists().getByTitle('TestList1');
var item = new SP.ListItemCreationInformation();
var oListItem = oList.addItem(item);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
Enter Item Title: <input type="text" id="txtTitle" /> <br/><br/>
<button type="button" onclick="insertitemtolist();">Insert Item To List</button>
In this example, you will be provided an option to enter the title for the item and user can click on the button to save the item. hope this will help for you!
Best SharePoint 2013 Hosting Recommendation
HostForLIFE.eu offer the Best, Cheap and Recommended SharePoint 2013 hosting start from €9.99/month. They can load your site against anticipated traffic and recommend the best option for you. HostForLIFE.eu is Microsoft No #1 Recommended Windows and ASP.NET Hosting in European Continent. Their service is ranked the highest top #1 spot in several European countries, such as: Germany, Italy, Netherlands, France, Belgium, United Kingdom, Sweden, Finland, Switzerland and many top European countries.
ASPHostPortal.com’s Best ASP.NET hosting platform on Windows 2012 and Windows 2008 is compatible with SharePoint 2013 hosting. Needless to say, you’ll be able to really feel very comfy with their hosting service. Their best and inexpensive SharePoint 2013 hosting package is starting from $9.99/mo only. And with their promo code, you will get free domain as well. Not just that, in addition they supply 30 days cash back guarantee. Their servers are 99.99% uptime, it’s important believe which you require for your SharePoint 2013 site, so your website is by no means down.
Get high functionality, best uptime along with the most dependable SharePoint 2013 Hosting site with them. SharePoint 2013 hosting from DiscountService.com.au provides a protected, trustworthy and performance-driven foundation for your website and apps. If you’re searching for the correct Windows ASP.NET hosting that support SharePoint 2013 hosting provider, they are the correct selection for you. They have proactive monitoring down to seconds with reactive options in spot to ensure the stability in the services they offer. All hosting servers are monitored 24/7/365. They use enterprise software to monitor their whole network infrastructure. Their very best and inexpensive SharePoint 2013 hosting price begins from $10.00 monthly.