相关疑难解决方法(0)

为什么任何html按钮导致aspx页面回发?

我在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"属性.

html javascript asp.net sharepoint

12
推荐指数
2
解决办法
2万
查看次数

标签 统计

asp.net ×1

html ×1

javascript ×1

sharepoint ×1