with (top.window.location){
href = "abc.html";
}如果不用with方法,则需要这样:
top.window.location.href = "abc.html";with方法的作用: 缩写其参数部分(起到偷懒的作用,个人认为^_^)
href = "abc.html";
}如果不用with方法,则需要这样:
top.window.location.href = "abc.html";with方法的作用: 缩写其参数部分(起到偷懒的作用,个人认为^_^)
{baseURL = href.substring (0,href.lastIndexOf ("/") + 1)}
total_toc_items = 0;
current_overID = "";
last_overID = "";
browser = navigator.appName;
version = parseInt(navigator.appVersion);
client=null;
loaded = 0;
if (browser == "Netscape" && version >= 3) client = "ns3";
function toc_item (img_name,icon_col,width,height) {
if (client =="ns3") {
img_prefix = baseURL + img_name;
this.icon_col = icon_col;
this.toc_img_off = new Image (width,height);
this.toc_img_off.src = img_prefix + "_off.gif";
this.toc_img_on = new Image (width,height);
this.toc_img_on.src = img_prefix + "_on.gif";
}
}
这一段能不能详细解释一下
{baseURL = href.substring (0,href.lastIndexOf ("/") + 1)}
等价于
baseURL = top.window.location.href.substring (0,href.lastIndexOf ("/") + 1)