我看到以下异常在FF 3.5.6:打电话时NS_ERROR_MALFORMED_URI在FF document.location.replace()
uncaught exception: [Exception... "The URI is malformed" nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)" location: "JS frame :: http://x :: refreshPage :: line 193" data: no]
出现此错误调用document.location.replace时(“/相对/ url“)在iframe的父窗口上。
它也可以在FF2中重现,但IE8不会出现问题。
编辑:在相同的上下文下面的代码不具有问题:
document.location.reload();
你用什么取代它?它可能以Firefox不能处理的格式错误的URI结束...... – sdwilsh 2009-12-18 06:23:46
我用相对路径替换它。我注意到,如果我使用绝对路径,这个问题不存在。我想这可能是一个iframe安全限制。 – jthompson 2009-12-18 16:17:10