How to refresh page, Google app Script Web

前端 未结 2 1797
忘掉有多难
忘掉有多难 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 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();
    }
    

提交回复
热议问题