middle click (new tabs) and javascript links

前端 未结 7 1899
温柔的废话
温柔的废话 2020-12-10 02:36

I am in charge of a website at work and recently I have added ajaxy requests to make it faster and more responsive. But it has raised an issue.

On my pages, there is

7条回答
  •  Happy的楠姐
    2020-12-10 03:04

    It would require some testing, but I believe that most browsers do not execute the click handler when you click them, meaning that only the link is utilized.

    Not however that your handler function needs to return false to ensure these links aren't used when normally clicking.

    EDIT: Felt this could use an example:

    
    

提交回复
热议问题