how to prevent blur() running when clicking a link in jQuery?

前端 未结 4 1402
死守一世寂寞
死守一世寂寞 2020-11-27 07:12

i have:


and

$(\'input\').blur(function(){
    alert(\'stay focused!\');
});

4条回答
  •  抹茶落季
    2020-11-27 07:21

    If you want to keep the cursor at its position in a contenteditable element, simply:

    $('button').mousedown(function(){return false;});
    

提交回复
热议问题