Kendo ui 剑道界面-为什么点击按钮刷新页面?

Kendo ui 剑道界面-为什么点击按钮刷新页面?,kendo-ui,kendo-mvvm,Kendo Ui,Kendo Mvvm,请在下面找到我的代码: 客户查询表格模板 <script type="text/x-kendoui-template" id="customer-search-view-template"> <div class="searchform" id="searchCustomer"> <form class="frmSearch"> <input name="searchTxt" data-bind="valu

请在下面找到我的代码:

客户查询表格模板

<script type="text/x-kendoui-template" id="customer-search-view-template">
    <div class="searchform" id="searchCustomer">
        <form class="frmSearch">
            <input name="searchTxt" data-bind="value: customerName" class="k-textbox" />
            <button class="k-button" data-bind="click: searchClicked">Search</button>
            <button class="k-button" data-bind="click: newClicked">New</button>
        </form>             
    </div>
</script>
单击搜索按钮时,文本在文本框中设置,但这也会使用地址栏中的
?searchTxt=search+clicked
刷新页面


我可以知道为什么此按钮单击刷新页面,以及如何在单击按钮时停止刷新页面吗?

我会尝试为每个类似项设置属性“type”:

<button type="button" class="k-button" data-bind="click: searchClicked">Search</button>
<button type="button" class="k-button" data-bind="click: newClicked">New</button>
搜索
新的

页面认为每个人都在执行表单提交操作,但通过放置type属性,可以访问要搜索的事件。如果不打算发布任何数据,则可能不需要表单标记,而只需要一个js事件处理程序。祝你好运。

我尝试了
type=button
,但它仍然会刷新页面-@kryptonkalI仍然怀疑它正在页面上执行帖子。尝试覆盖按钮事件并包括以下内容:e.preventDefault();e、 停止即时复制();console.log('here')或alert('here')选择一个。
e.preventDefault();e、 停止即时复制()工作。谢谢。-@kryptonkal
<button type="button" class="k-button" data-bind="click: searchClicked">Search</button>
<button type="button" class="k-button" data-bind="click: newClicked">New</button>