[英]How to Add a Script in column of sharepoint list / document library
I need a code in sharepoint online, that triggers a script to open a file, where the location of file in local computer.我需要 sharepoint 在线代码,触发脚本打开文件,文件在本地计算机中的位置。 In my opinion, this code like button/image/hyperlink/etc, in the background is Javascript/JQUERY (event click) and this button will be placed in a specific column (in the example below the name of column is "FileLocation") in sharepoint list / sharepoint document library.
在我看来,像按钮/图像/超链接/等这样的代码,在后台是 Javascript/JQUERY(事件点击)并且这个按钮将被放置在一个特定的列中(在下面的例子中,列的名称是“FileLocation”)在 sharepoint 列表 / sharepoint 文档库中。 like screen shoot below.
就像下面的屏幕截图。
You can insert JS/Jquery script or change the Dom elements on the field through SPFx Field extension .您可以插入 JS/Jquery 脚本或通过SPFx Field extension更改字段上的 Dom 元素。
And you can open lcoal file using js as below:您可以使用 js 打开 lcoal 文件,如下所示:
Besides, some browsers will specifically block local file access this way for security reasons.此外,出于安全原因,某些浏览器会专门阻止以这种方式访问本地文件。
BR BR
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.