![](https://i-blog.csdnimg.cn/blog_migrate/cdec0645add3fc3c328197dda5c76203.gif)
![ExpandedBlockStart.gif](https://i-blog.csdnimg.cn/blog_migrate/81178cc93a2a3bb5048d90d76e7ec935.gif)
<!--<br/ /> <br/ /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ /> http://www.CodeHighlighter.com/<br/ /> <br/ /> -->
function test(tempip)
{
var defaultLocation = " http://ww.baidu222.com " ;
var patrns = [
{ips: " 117.80.193.* " ,location: " http://www.baidu222 " ,mess: " 123 " },
{ips: " 222.92.*.* " ,location: " http://www.baidu222 " ,mess: " 456 " }
];
var ip = tempip;
for ( var i = 0 ;i < patrns.length;i ++ )
{
var reg = new RegExp( " ^ " + patrns[i].ips.replace( / \* / img, " \\d{1,3} " ) + " $ " , " g " );
if (reg.test(ip))
{
alert(tempip + patrns[i].mess);
document.location = patrns[i].location;
return ;
}
}
}
function json(result)
{
test(result.ip);
}
document.write( ' <script type="text/javascript"
src="http://baidu123.com/order/aizi00/ip.asp"></script> ' );
function test(tempip)
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->
{
var defaultLocation = " http://ww.baidu222.com " ;
var patrns = [
{ips: " 117.80.193.* " ,location: " http://www.baidu222 " ,mess: " 123 " },
{ips: " 222.92.*.* " ,location: " http://www.baidu222 " ,mess: " 456 " }
];
var ip = tempip;
for ( var i = 0 ;i < patrns.length;i ++ )
{
var reg = new RegExp( " ^ " + patrns[i].ips.replace( / \* / img, " \\d{1,3} " ) + " $ " , " g " );
if (reg.test(ip))
{
alert(tempip + patrns[i].mess);
document.location = patrns[i].location;
return ;
}
}
}
function json(result)
{
test(result.ip);
}
document.write( ' <script type="text/javascript"
src="http://baidu123.com/order/aizi00/ip.asp"></script> ' );
返回 json({ip:"127.0.0.1"})
<script type="text/javascript"><!-- google_ad_client = "pub-1985112462197986"; /* 728x90, 创建于 10-7-27 */ google_ad_slot = "9407691718"; google_ad_width = 728; google_ad_height = 90; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>