TutorialThe earliest way to open a new window that can be verified is that Alibaba Cloud (Web Designer)'s article is implemented using JS, but this method has a disadvantage, sometimes this section of JS conflicts with other and JS!
So I found another method to open a new window (lazy Image Library) with pure CSS, but this method is not verified, so I had to add some means!
First, convert the CSS code to the JS Code (webmaster station tool). The Code is as follows:
Reference content is as follows: // New blank window Document. writeln ("<style type = \" text/css \ "> "); Document. writeln ("<! --"); Document. writeln (". blank a {test: expression (target = \" _ blank \");}"); Document. writeln ("}"); Document. writeln ("--> "); Document. writeln ("</style> "); |
Generally, JavaScript code is called on webpages. Therefore, you only need to insert the main JS Code on the website! In the header area of HTML, use JS to call this CSS:
<Script type = "text/javascript" src = "skin/default/js. js"> </script> |
Add class = "blank", for example, <div id = "footer" class = "blank">
Author: IdealBoy QQ: 7273771