方法其实很简单,代码如下: top.location.replace('http://www.baidu.com'); 这是一个小技巧,以防开发中遇到的各种问题。 转载于:https://www.cnblogs.com/ningmeng666/p/7550584.html