我有使用以下代码的剑道窗口,然后如何从剑道窗口外部选择jquery ID:btnValidateConfirmPin?我也尝试过使用$(document).on(“ click”起作用,但是我不知道如何在此事件中调用$(this),任何可以直接从剑道窗口调用选择器的方法?
// Kendo窗口...
@Html.AntiForgeryToken()//Art add [2017-07-13]
<div class="formarea">
<span class="h3-left"></span><h3 class="fixed-h3">@SharedResource.ConfrimPinHeader</h3><span class="h3-right"></span>
<br />
<div> ... </div>
<div>
<!-- this button -->
<button id="btnValidateConfirmPin" class="button green" type="submit">@SharedResource.ContinueBotton</button>
</div>
</div>
...
//剑道外
$("#btnValidateConfirmPins").click(function (e) { //not work });
$(document).on("click","##btnValidateConfirmPins",function() { //work but how to call $(this)});
如果我理解正确,您想在#btnValidateConfirmPins
方法调用内使用kendoWindow。
您可以使用kendoWindow ID来获取它并调用data("kendoWindow")
函数。例如:$("#YourKendoWindowID").data("kendoWindow")
P.S .:文档单击方法带有两个#
标记。