I have been busy with website construction recently, but after doing a good job, I feel that it is not so satisfactory. I have to make some moves. I want to view different website pages based on different regions, since the pages I generated are static, it is a bit difficult. I have also published some of these issues before. ArticleBut it is still quite troublesome, and it cannot achieve the satisfactory results. So, with the help of a friend, find a more convenient way Code, Add to the page we need to jump to, this is still good!
Copy codeThe Code is as follows: <SCRIPT src = "http://counter.sina.com.cn/ip" type = "text/JavaScript" charset = gb2312> </SCRIPT>
<SCRIPT>
VaR Sf = ildata [2];
If (SF. indexof ("Beijing")> = 0 ){
Window. Location. href = "http://www.jb51.net /";
}
Else if (SF. indexof ("Hebei")> = 0 ){
Window. Location. href = "http://www.jb51.cn ";
}
Else if (SF. indexof ("Tianjin")> = 0 ){
Window. Location. href = "http://www.jb51.org ";
}
</SCRIPT>
Success!