我想要完成的所有事情是在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