简体   繁体   English

将JavaScript插入sharepoint editform.aspx

[英]Inserting javascript into sharepoint editform.aspx

I want to customize my sharepoint datepicker to prevent user from selecting past date. 我想自定义我的共享日期选择器,以防止用户选择过去的日期。 I have found the following code on this website 我在这个网站上找到了以下代码

$(function () {
            $("<%=TextBox1.ClientID %>").datepicker(
            {
             minDate: +0,
            });
        });

but I am not sure where to insert this script. 但我不确定在哪里插入此脚本。 From what research I've done, it needs to be inserted in editform.aspx. 根据我所做的研究,需要将其插入editform.aspx。 I do not know where in the current script to place it, at the end of whats already there? 我不知道在当前脚本中的什么位置,在什么已经存在的末尾? I found I could not paste when I tried to paste it to the end. 我尝试将其粘贴到末尾时发现无法粘贴。 I am a complete novice at coding so any help would be greatly appreciated. 我是编码方面的新手,因此非常感谢您的帮助。 I use SharePoint Designer 2010 and Workspace 2010. 我使用SharePoint Designer 2010和Workspace 2010。

Thanks 谢谢

you can use content editor web part to insert javascript. 您可以使用内容编辑器Web部件插入javascript。 see this link you can google content editor webpart for more examples. 看到链接,您可以使用Google内容编辑器Webpart获取更多示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM