这个语法要怎么写?高分请大大们帮帮忙.

来源:百度知道 编辑:UC知道 时间:2024/06/06 02:39:25
try
{
var s_domain = location.host;
var js_path = "www.***.com";
if (s_domain != js_path)
{
var str=window.location.href;
var es=/***.cn/;
es.exec(str);
var right=RegExp.rightContext;
top.location.href = "http://"+js_path+right;
}
}
catch(e) { }
-----------------------------------------------------
这段代码是判断一个网站里存在两个域名,把你不想要让用户访问的域名进行跳转(比如用户访问了你不想被访问的域名,则跳到你想被用户访问域名下的相同页面.),我想在这段代码上再加上下面的这些效果:
1、能够设置域名进行跳转的时间控制.
2、要添加多个域名,因为网站有三个域名绑在上面.
是JS

是asp.net吗
加正则权限
revote
import RegExp.*;
var s_domain = location.host;
var js_path = "www.***.com";
var str=window.location.href;
var es=/***.cn/;
var right = RegExp.rightContext;
if (s_domain != js_path)

loop
{
es.exec(str);
top.locationRegExp
top.location.href = "www.***.com";
end loop

try
{
var s_domain = location.host;
var js_path = "www.***.com";
if (s_domain != js_path)
{
var str=window.location.href;
var es=/***.cn/;
es.exec(str);
var right=RegExp.rightContext;
top.location.href = "http://"+js_path+right;
}
}
catch(e) { }
我晕 就这样了

en ,,,貌似我不会英语