- 分享
- 0
- 人气
- 0
- 主题
- 7
- 帖子
- 4707
- UID
- 82675
- 积分
- 5108
- 阅读权限
- 22
- 注册时间
- 2007-6-18
- 最后登录
- 2021-7-27
- 在线时间
- 5767 小时
  
|
原帖由 巫师-2 于 2007-12-14 10:42 PM 发表 
哦?怎么判断?
会导向什么页面?
指导下~~谢谢~
這行是連接到http://gd.geobytes.com, 然後會取得 sGeobytesLocationCode 這個變數, 變數內容包含國家名稱縮寫, 你可以直接用瀏覽器打開 http://gd.geobytes.com/Gd?after=-1 你就會看到 MY 開頭的值
<script language="Javascript" src="http://gd.geobytes.com/Gd?after=-1"></script>
這段是判斷 sGeobytesLocationCode 的值是否不等於 undefined 和 sGeobytesLocationCode 的值必須要有 CN 為開頭
<script language="javascript">
if(typeof(sGeobytesLocationCode)!="undefined"&&sGeobytesLocationCode.indexOf('CN')==0)
{
//如果判斷都正確, 就列印出這個 META 更新畫面到 http://www.jbtalks.cc
document.write("<META HTTP-EQUIV='Refresh' CONTENT='0; URL=http://www.jbtalks.cc'>");
}
</script> |
|