我在SharePoint网站上创建了.aspx页面,并在页面HTML按钮中插入.
例
<PublishingWebControls:editmodepanel PageDisplayMode="Display" runat="server" SuppressTag="True">
...
<button>Click Me!</button>
...
</PublishingWebControls:editmodepanel>
Run Code Online (Sandbox Code Playgroud)
每次我点击"Click Me!" 发回邮件.这不是我想要的行为,但我找到了一种如何不引起回发的方法.我将javascript代码添加到onclick属性中<button onclick='return false;'>Click Me!</button>
我的问题是,为什么回发后,即使按钮不包含type="submit"属性?
我还检查了母版页,其中包含<form runat="server">并包装了所有内容,但也没有action="page.aspx"属性.