无法在内容编辑器和脚本编辑器中使用脚本标签 [英] Unable to use script tag in Content Editor and Script Editor

查看:81
本文介绍了无法在内容编辑器和脚本编辑器中使用脚本标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题仅在客户端PC上发生.如果我使用RDP在服务器计算机上打开浏览器,那么它将起作用.这是发生了什么

1.编辑页面
2.添加内容编辑器或脚本编辑器
3.编写代码< script></script>或< script language ="javascript"> alert("hello world");</script>
4.按保存".功能区上的按钮保存页面
5.无法显示该页面".错误显示在浏览器中.在IE,Chrome和Firefox中进行了测试.

This issue is happening from client PCs only. If I open the browser on server machine using RDP then it works. Here's what's happening.

1. Edit page
2. Add Content Editor or Script Editor
3. Write code <script></script> or <script language="javascript">alert("hello world");</script>
4. Press "Save" button on ribbon to save page
5. "The page cannot be displayed" error is shown in browser. Tested in IE, Chrome and Firefox.

但是当我在SharePoint服务器本身的IE上执行相同的操作时,它就可以正常工作.

是由于某些安全性/防火墙/AD/浏览器策略吗?

But when I do the same operation on IE on SharePoint server itself then it works fine.

Is it due to some security/firewall/AD/browser policy?

推荐答案

弗兰克·马丁(Frank Martin)顾问,

Hi Frank Martin Consultant,

根据在SharePoint 2013环境中进行的测试,我创建了一个页面,并将下面的代码添加到内容编辑器Web部件或脚本编辑器Web部件中.它可以在IE和Chrome中运行.

Per my test in my SharePoint 2013 environment, I create a page and add the code below to the content editor web part or script editor web part. It can work in IE and Chrome.

<script language="javascript">alert("hello world");</script>

要解决此问题,请检查以下内容:

To troubleshoot the issue, check things below:

1.使用F12工具调试页面中的页面无法显示"错误.

1. Use F12 tool to debug the error "The page cannot be displayed" in the page.

2.创建一个新页面并将代码添加到内容编辑器Web部件或脚本编辑器Web部件中,以检查是否会发生相同的问题.

2. Create a new page and add code to the content editor web part or script editor web part to check if the same issue will occur.

最诚挚的问候,

萨拉范


这篇关于无法在内容编辑器和脚本编辑器中使用脚本标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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