[英]How to add items to sharepoint list from a html document?
I am trying to create a comments section in a sharepoint site. 我正在尝试在共享站点中创建评论部分。 Is there anyway I can use javascript to read some text from a 'div' or a 'p' element and then add that item into a list when the user press submits?
无论如何,我可以使用javascript从'div'或'p'元素中读取一些文本,然后在用户按下提交时将该项目添加到列表中吗?
Some examples of codes would be much appreciated. 代码的一些示例将不胜感激。
Also can you try and only give javascript examples please and not jquery. 您也可以尝试只提供JavaScript示例,而不提供jquery。
Thak you for your help in advance 提前感谢您的帮助
For that kind of work you can use Sharepoint JavaScript Client Object Model. 对于此类工作,您可以使用Sharepoint JavaScript客户端对象模型。 Please read about it from:
请从以下网址阅读:
How to: Complete basic operations using JavaScript library code in SharePoint 2013 如何:在SharePoint 2013中使用JavaScript库代码完成基本操作
there is not much differences in basic operations between 2010/2013 but be aware. 2010/2013年之间的基本操作没有太大差异,但请注意。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.