Android webview “location.replace” doesn't work

后端 未结 3 640
感情败类
感情败类 2020-12-30 18:01

I have an Android webview with a page that redirects to another page, using location.replace(url).
Lets say that I have page \"A\" that redirects to page \"

3条回答
  •  攒了一身酷
    2020-12-30 18:20

    function locationReplace(url){
      if(history.replaceState){
        history.replaceState(null, document.title, url);
        history.go(0);
      }else{
        location.replace(url);
      }
    }

提交回复
热议问题