Create a W3C validated anchor link with target=“_blank”

前端 未结 11 1858
臣服心动
臣服心动 2021-01-04 22:51

I have the following piece of HTML that creates a new window when clicked:

glide by the people
         


        
11条回答
  •  暖寄归人
    2021-01-04 23:21

    1. Add rel="new-window" attribute to the link (instead of target="_blank")
    2. add jquery script to head of page and add the following snippet

      
      

    (Please note that as I typed this in the stackoverflow textbox, I haven't tested it.)

提交回复
热议问题