我想要完成的所有事情是在SharePoint中单击按钮时调用JavaScript函数。这是在SharePoint Designer 2007年我的“代码”的程度......在按钮上点击分享点触发javascript
<%@ Page masterpagefile="~masterurl/default.master" language="C#" title="|" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bxe2111e8529c" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document" %>
<asp:Content id="Content1" runat="server" contentplaceholderid="PlaceHolderMain">
<script type="javascript">
function tellme() {
alert('yep yep yep');
}
</script>
<p></p>
<asp:Button runat="server" Text="Button" id="Button1" onclientclick="tellme()" />
</asp:Content>
谁能告诉我,为什么功能不叫?当我保存页面时,查看它并单击按钮,它只是用作提交按钮。我对JS/HTML和PHP非常满意,但是我在SharePoint/.net中徘徊,并且稍微挣扎。
感谢
汤姆
您是否查看浏览器的HTML源代码以查看是否有问题? – 2011-06-01 17:31:08