javascript - What is the difference between clicking the refresh button in the browser and selecting the link and pressing enter? -
in web application,i have made pin popup supposed popup , disable rest of screen after timeout. when page refreshed(ctrl+r) or clicking on refresh button, pin popup appears, if link highlighted , enter key pressed, popup not come. how (click on link , press enter) different (ctrl+r) or clicking on refresh button? please in advance.
generally: clicking on link (or tab , enter/space) starts new (get scratch (like open new browser , paste url in address)).
while refresh/ctrl-r resends previous command - if post post.
you can use ctrl-f5 new get.
in addition: element on page (specifically link in case) may have event handler
applied can stop default action.
so, if yout link has event handler contains e.preventdefault();
or return false;
(eg <a href='...' onclick='return false;'>link</a>
) appear nothing happening.
pressing enter/space on focused link same clicking (runs .click()
event handler).
Comments
Post a Comment