从HTML页面调用SP.JS和min.js [英] Calling SP.JS and min.js from HTML page

查看:135
本文介绍了从HTML页面调用SP.JS和min.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个在sharepoint中设计的HTML页面(它不在CEWP中),这将是主页,现在我试图从此HTML页面使用Javascript向sharepoint列表中插入一个值,将SP.js和min .js似乎没有每次都加载到HTML文件中 给出SP未定义

i have an HTML page designed in sharepoint(its not in CEWP), this will be the home page, now from this HTML page i am trying to insert a value to sharepoint list using Javascript, put the SP.js and min.js doesn't seem to load in HTML file, every time it gives SP is not defined,

我尝试过

SP.SOD.executeFunc

ExecuteOrDelayUntilScriptLoaded

但似乎不起作用,

我可以做什么

what els ecan i do

推荐答案

尝试以如下方式在您的html文件中引用您的sp.js和min.js.

Try to refer your sp.js and min.js like below way in your html file.

 <script  type="text/javascript" src="/_layouts/sp.js"></script>

或者按照下面的方式尝试...

Or Try like below way...

  ExecuteOrDelayUntilScriptLoaded(myfunction,"sp.js");

 ExecuteOrDelayUntilScriptLoaded(myfunction, "sp.js");




这篇关于从HTML页面调用SP.JS和min.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆