【问题标题】:How can I trigger alert event when I click on a toolbar kendo Mobile button?单击工具栏 kendo Mobile 按钮时如何触发警报事件?
【发布时间】:2017-10-09 05:19:08
【问题描述】:

当我单击自定义工具栏按钮时,我试图调用一个函数。我想看看是否通过在其中实现 alert() 函数来调用该函数。它不会触发任何消息。知道如何通过单击警报旁边的按钮来检查该功能是否被触发?

代码:

....

toolbar: [
                {template: '<a class="k-button" onclick="removeLicense()">Ukloni licencu</a>'}
         ],
...

 function removeLicense() {
//  window.kendoAlert("hello");
        alert("hello");
    }

【问题讨论】:

  • 你的函数有&lt;script&gt;&lt;/script&gt;标签吗?
  • 为什么不 onclick="alert("hello")"

标签: javascript jquery user-interface kendo-ui kendo-mobile


【解决方案1】:

我准备了一个Dojo example,它会在单击工具栏按钮时触发您的警报。

希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-14
    • 1970-01-01
    • 2012-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多