问题
Ho can we redirect a page in new tab when we use meta tag. For ex. i am trying this code
<meta http-equiv="refresh" content="5;URL=http://www.example.com >
but it redirects it in same page. And if i add the following code after the url then also nothing happens
target = "_blank"
Please help me.
回答1:
You can try something like this:
<meta http-equiv="refresh" content="5; URL=javascript:window.open('http://google.com','_blank');">
This post is related to your question.
回答2:
When I try this I receive an error in the console :
Refused to refresh https://example.com/ to a javascript: URL
来源:https://stackoverflow.com/questions/30025594/how-to-redirect-in-new-tab-with-meta