0

I have problem with SharePoint encoding the javascript link, that normally renders like href="javascript:Function('url');" but in Sharepoint like href="javascript:Function(& #39;url& #39;)" wich of course does not work.

What do I need to do?

I need to be able to use my user control as stand alone as well as linked into a sharepoint page, right!?

4

1 回答 1

0

你在哪里插入代码?在 Web 部件、自定义控件等中?

如果您尝试使用内容编辑器 Web 部件,我在 2010 年确实注意到了一些差异。在尝试使用需要 javascript 的项目时,我刚刚创建了一个驻留在 SiteAssets 中的 .txt 文件。该文件包含我通常会添加到 Web 部件的所有 HTML/JS。然后将内容编辑器 Web 部件指向/链接到该文件。

这似乎解决了我遇到的一些问题。可以为你工作。

于 2010-11-03T19:07:20.250 回答