EasyUI Forum
October 19, 2025, 03:34:18 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: linkbutton禁用后,其注册的click事件的回调函数依然能执行  (Read 18476 times)
kingor2001
Jr. Member
**
Posts: 61


View Profile
« on: November 10, 2013, 08:55:44 AM »

例如定义一个linkbutton,初始化disabled:true
<a href="#" class="easyui-linkbutton" data-options="disabled:true" id="t">test</a>
1、然后设置click事件
$("#t").click(function() {
    alert(211);
});
在disabled状态下的linkbutton,click的回调函数仍然会执行。

2、如果该linkbutton应用tooltip,例如
$("#t").tooltip({
      showEvent : 'click',
      content : "......"
   });
在disabled状态下,linkbutton的click仍然会把tooltip显示出来。
« Last Edit: November 11, 2013, 06:24:39 AM by kingor2001 » Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #1 on: December 04, 2013, 12:29:52 AM »

例如定义一个linkbutton,初始化disabled:true
<a href="#" class="easyui-linkbutton" data-options="disabled:true" id="t">test</a>
1、然后设置click事件
$("#t").click(function() {
    alert(211);
});
在disabled状态下的linkbutton,click的回调函数仍然会执行。

2、如果该linkbutton应用tooltip,例如
$("#t").tooltip({
      showEvent : 'click',
      content : "......"
   });
在disabled状态下,linkbutton的click仍然会把tooltip显示出来。

yes, you must unbound click even !
或者你可以直接写在 onclick 里面。
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!