Home  >  Article  >  Web Front-end  >  How to set up so that when you click the hyperlink, it will be a game page, and then click again to get the desired page_html/css_WEB-ITnose

How to set up so that when you click the hyperlink, it will be a game page, and then click again to get the desired page_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:15:071095browse

Reply to the discussion (solution)

I will not go to a site like this a second time. When I encounter some browsers that provide website security prompts, sites like yours will be directly blacklisted.

4ec11beb6c39d0703d1751d203c17053
document.onclick=function()
{
window.location.href="Normal page address";
}
2cacc6d41bbb37262a98f745aa00fbf0
You might as well start with a normal page, and when you click it, a new window will pop up the game page

The bad guy, I didn’t tell you

Actual connection When it comes to the game page, the real page is implemented using a script to set the location. However, please note that the connection must set target="_blank". Otherwise, the script will not be executed if the current page is redirected.

<a href="http://www.coding123.net" onclick="gotoURL(this,'http://bbs.csdn.net')" target="_blank">CSDN</a><script type="text/javascript">    function gotoURL(a, realURL) {        setTimeout(function () { top.location.href = realURL; }, 10);    }</script>

Not that To make such a website, there are some websites like this. If I want to know how such a website is made, I will not go there a second time. When I encounter some browsers that provide website security prompts, sites like yours will be directly blacklisted.

When I looked at some comic websites and various game pages, I was very curious about how these codes are written. The original poster is bad, I won’t tell you.

When actually connecting, the game page is used, and the real page uses a script. Set the location implementation, but note that the connection must set target="_blank", otherwise the script will not be executed if the current page is redirected
HTML code
664a1ee14e61fc6873ba04b12bdbdf5bCSDN5db79b134e9f6b82c0b36e0489ee08ed
1 Click on the a label to actually enter It's a game interface. It's just that the game interface has a jump after a few seconds to jump to the normal page. Similar to the registration interface of some forums, after successful registration, there will be a prompt "Registration successful, jump after x seconds", which actually means the same thing.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn