我使用GAS和HTML服務創建了一個應用程序。它適用於Mac上的Safari和Chrome,使用谷歌應用程序帳戶的不同登錄名,但對於相同的帳戶,它不能在Windows機器上的任何瀏覽器上運行。GAS無法在Windows機器上工作
問候, 阿瓊
代碼加載頁面
function doGet(e) {
Logger.log(Utilities.jsonStringify(e));
if (!e.parameter.page | e.parameter['page'] == 'index'){
var template = HtmlService.createTemplateFromFile('index');
var htmlOutput = template.evaluate()
.setSandboxMode(HtmlService.SandboxMode.IFRAME);
return htmlOutput;
}
return HtmlService.createTemplateFromFile(e.parameter['page']).evaluate();
}
的頁面沒有加載
<style type="text/css">
#header {
height:100px;
background:Green;
font-size:300%;
color: Black;
align-content: centre;
}
body
{
padding: 50px;
}
.animate
{
transition: all 0.1s;
-webkit-transition: all 0.1s;
}
.action-button
{
position: relative;
padding: 10px 40px;
margin: 0px 10px 10px 0px;
float: left;
border-radius: 10px;
font-family: 'Pacifico', cursive;
font-size: 25px;
color: #FFF;
text-decoration: none;
}
.blue
{
background-color: #3498DB;
border-bottom: 5px solid #2980B9;
text-shadow: 0px -2px #2980B9;
}
.red
{
background-color: #E74C3C;
border-bottom: 5px solid #BD3E31;
text-shadow: 0px -2px #BD3E31;
}
.green
{
background-color: #82BF56;
border-bottom: 5px solid #669644;
text-shadow: 0px -2px #669644;
}
.yellow
{
background-color: #F2CF66;
border-bottom: 5px solid #D1B358;
text-shadow: 0px -2px #D1B358;
}
.action-button:active
{
transform: translate(0px,5px);
-webkit-transform: translate(0px,5px);
border-bottom: 1px solid;
}
</style>
<!-- display header -->
<div id="header">Green Leaf Airconditioning Services LLC</div>
<!-- Set up the div for users only and not supervisors -->
<? var logged_user = getcurruser(); ?>
<label><?=logged_user?></label>
<div id='users'>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=timesheet'> <input type='button' name='formload' value="Time Sheet" class="action-button animate blue"></a></p>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=expclaim'> <input type='button' name='formload' value="Expense Claim" class="action-button animate blue"></a></p>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=leaveapp'> <input type='button' name='formload' value="Leave Request" class="action-button animate blue"></a></p>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=tktrequest'> <input type='button' name='formload' value="Ticket Request" class="action-button animate blue"></a></p>
</div>
<div id='status'>
<!-- some options will be increased later -->
<!-- <p><?var url = getScriptUrl();?><a href='<?=url?>?page=timesheet'> <input type='button' name='formload' value="Time Sheet" class="action-button animate blue"></a></p> -->
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=expclaimstatus'> <input type='button' name='formload' value="Expense Claim Status" class="action-button animate blue"></a></p>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=leavestatus'> <input type='button' name='formload' value="Leave Status" class="action-button animate blue"></a></p>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=tktstatus'> <input type='button' name='formload' value="Ticket Status" class="action-button animate blue"></a></p>
</div>
<!-- show this when the user is also a supervisor -->
<div id='supervisors'>
</div>
它可以在任何瀏覽器在Mac上,但不工作的任何瀏覽器在Windows中。
你能提供更多的信息嗎?你會得到什麼錯誤?任何截圖,甚至你使用的代碼 – Gerardo 2015-04-01 18:00:45
謝謝你讓我們知道!現在,如果你想得到一些幫助,在其上發佈代碼示例,控制檯錯誤,更多信息,這不會給我們什麼。 – Kriggs 2015-04-01 18:01:19
嗨,問題是我沒有得到任何錯誤。我只是得到一個空白的屏幕。它不記錄任何錯誤。 – 2015-04-02 05:26:06