如何从剑道窗口外部调用jQuery选择器?



我有使用以下代码的剑道窗口,那么我如何从剑道窗口外部选择 jquery ID:btnValidateConfirmPin?我也尝试了 $(document(.on("点击"它的工作,但我不知道在这种情况下如何调用 $(this(,有什么方法可以直接从剑道窗口调用选择器吗?

剑道之窗 ...

@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")

PS:文档单击方法具有双#标记。

最新更新