jQuery,按钮,点击,事件绑定本文实例讲述了jQuery实现按钮只点击一次后就取消点击事件绑定的方法。分享给大家供大家参考。具体实现方法如下: <input type="button" id="my-selector" value="只能点击一次" /><script>$('#my-selector').bind('click', function() { $(this).unbind('click'); alert('Clicked and unbound!');});</script> 希望本文所述对大家的jQuery程序设计有所帮助。 jQuery,按钮,点击,事件绑定
|