javascript - Sap ui5:为什么 attachEvent 方法不适用于“mouseenter”事件?
问题描述
我正在尝试将 mouseenter 处理程序添加到其中一个控件(PlanningCalendarAppointment)。这就是我已经尝试过的。
control.attachEvent("mouseenter", function () {
console.log("test"); // Fixed compilation error
});
但它不会产生任何影响。
解决方案
请试试 。attachBrowserEvent而不是 attachEvent:
control.attachBrowserEvent("mouseenter", function () {
console.log("test"); // Fixed compilation error
});
推荐阅读
- php - 如何从 WooCommerce 客户感谢电子邮件中删除字段(客户处理订单)
- delphi - 如何使用 DBLookupComboBox 在 Delphi 中的表单页面之间移动
- r - 错误 - cocor 中的变量必须是数字
- java - Grails Spring Security 中的 AbstractMethodError
- javascript - 如何在 node.js 中使用startsWith?
- c# - 序列化派生类时如何让xml数据合同序列化程序忽略基类属性
- c++ - mongo-cxx 驱动程序找不到 unique_ptr 的 polyfill
- r - 从浏览器的目录中查看保存的 LDAvis 图
- python - 尝试在 Python 中运行使用 Sage Math 的代码时出现 NameError 和 AttributeError
- html - element.style 和 element.setAttribute(attribute, value) 不一样?