我在用剑道窗。
我还有其他的html视图。
在这个html中,我有一个按钮。单击此按钮时,我希望关闭当前窗口。
<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();
我该怎么做呢。
谢谢。
发布于 2013-09-27 09:37:05
不要在同一文档中复制ID。siteConfig函数的示例:
function siteConfig() {
// ...
// some useful code
$("#window").data("kendoWindow").close();
});或编写单击事件处理程序:
$(document).on('click', '.save', function (e) {
$("#window").data("kendoWindow").close();
});在这里阅读关于窗口的kendo文档:http://demos.kendoui.com/web/window/index.html
https://stackoverflow.com/questions/19046950
复制相似问题