首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用关闭kendo窗口绑定单击事件

用关闭kendo窗口绑定单击事件
EN

Stack Overflow用户
提问于 2013-09-27 09:10:32
回答 1查看 6.6K关注 0票数 0

我在用剑道窗。

我还有其他的html视图。

在这个html中,我有一个按钮。单击此按钮时,我希望关闭当前窗口。

代码语言:javascript
复制
<div id="window" class="k-window-content k-content" style="overflow: auto;" data-role="window" tabindex="0" role="dialog" aria-labelledby="window_wnd_title">
    <iframe class="k-content-frame" frameborder="0" src="http://localhost/eventBot/index.php/parsePortal/scrapePortalSite/5623" title="">
    <html class="k-ff k-ff23">
    <head>
    <body>
    <div id="example" class="k-content">
    <div id="window">
        <div class="block_content" data-role="tooltip">
           <form id="siteConfigForm" accept-charset="utf-8" method="post" action="http://localhost/eventBot/index.php/parsePortal/saveConfig" data-role="validator" novalidate="novalidate">
           <table>
              <tr>
              <td>
                   <button class="k-button save" onclick="siteConfig()" type="button">Save</button>
                   <button class="k-button" onclick="windowss()" type="button">close</button>
              </td>
              </tr>
           </table>
           </form>
        </div>
      </div>
 </div>

在这个html中,我有保存按钮,当我点击这个按钮时,我想绑定window.close();

我该怎么做呢。

谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-09-27 09:37:05

不要在同一文档中复制ID。siteConfig函数的示例:

代码语言:javascript
复制
function siteConfig() {
    // ...
    // some useful code

    $("#window").data("kendoWindow").close();
});

或编写单击事件处理程序:

代码语言:javascript
复制
$(document).on('click', '.save', function (e) {
        $("#window").data("kendoWindow").close();
    });

在这里阅读关于窗口的kendo文档:http://demos.kendoui.com/web/window/index.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19046950

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档