function refreshMainFrame(url)
{
parent.main.document.location = url;
}
if (document.anchors(0))
{
refreshMainFrame(document.anchors(0).href);
}这段JS报
document.anchors is not a function
[Break on this error] if (document.anchors(0)) function out(e)
{
var e = e || event;
var oObj = e.srcElement || e.target;
var oTr = oObj.parentNode;
if(!oTr.tag)
oTr.className = "out";
}
这段JS报
event is not defined
[Break on this error] var e = e || event; 找了半天没找出哪里的问题,哪位帮我看下!谢谢!
{
parent.main.document.location = url;
}
if (document.anchors(0))
{
refreshMainFrame(document.anchors(0).href);
}这段JS报
document.anchors is not a function
[Break on this error] if (document.anchors(0)) function out(e)
{
var e = e || event;
var oObj = e.srcElement || e.target;
var oTr = oObj.parentNode;
if(!oTr.tag)
oTr.className = "out";
}
这段JS报
event is not defined
[Break on this error] var e = e || event; 找了半天没找出哪里的问题,哪位帮我看下!谢谢!
anchors[0]下面要将event作为参数传入,这样调用out(event)
2。var e = e || window.event;
[Break on this error] if (anchors(0))e is undefined
[Break on this error] var oObj = e.srcElement || e.target;
{
var e = getEvent();
var oObj = e.srcElement || e.target;
var oTr = oObj.parentNode;
if(!oTr.tag)
oTr.className = "out";
}
function getEvent()
{ //同时兼容ie和ff的写法
if(document.all) return window.event;
func=getEvent.caller;
while(func!=null){
var arg0=func.arguments[0];
if(arg0){
if((arg0.constructor==Event || arg0.constructor ==MouseEvent) || (typeof(arg0)=="object" && arg0.preventDefault && arg0.stopPropagation)){
return arg0;
}
}
func=func.caller;
}
return null;
}
这样写着,第二个问题解决了,但第一个还是没解决。
if (document.anchors[0])
{
refreshMainFrame(document.anchors[0].href);
}
在out函数中才可以function out(obj){
obj.srcElement
}
之类的