How to refresh page, Google app Script Web

前端 未结 2 1773
忘掉有多难
忘掉有多难 2021-01-26 18:09

Good afternoon.

I am trying to create a button to refresh the page, through the Google app Script Web, but the method \"window.location.reload ();\", do

相关标签:
2条回答
  • 2021-01-26 18:59

    After location.reload() you should return false in onclick function:

    function teste(){
    location.reload();
    return false;
    }
    
    0 讨论(0)
  • 2021-01-26 19:02

    Try this:

    Javascript:

    function reLoad() {
           google.script.run
          .withSuccessHandler(function(url){
            window.open(url,'_top');
          })
          .getScriptURL();
    }
    

    GS:

    function getScriptURL() {
      return ScriptApp.getService().getUrl();
    }
    
    0 讨论(0)
提交回复
热议问题