google scripts/html 試圖在頁面中顯示頁面
首先我要展示我的代碼,這是我正在運行的 html 代碼:<!DOCTYPE html><html> <head> <title>Elliots Site</title> <base target="_top"> <?!= include('Gcss'); ?> <script type="text/javascript"> </script> </head> <body> <div class="page"> <iframe style="width: 100%; height: 100px; overflow: hidden;" src="http://google.com" width="100" height="100" scrolling="no">Iframes not supported</iframe> <h1 class="emoj">"??"</h1> </div> <?!= include('Gjavascript'); ?> </body></html>這是我的 css 文件:<style> /* CSS reset */body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { margin:0; padding:0;} html, body { margin: 0; padding: 0;}body { font-family: 'Roboto', sans-serif; font-weight: 100;}.page iframe {vertical-align:center;width=200%;height=100%;}.page .emoj {text-align:center;color:auto;vertical-align:center;}.page{background-color:white;align-items: center;height:400px;background-attachment: fixed;background-repeat: no-repeat;text-align:center;}<style>我還有兩個文件來運行代碼和應用 css 文件,我很確定這不是問題所在。第一個是 gs 文件,它是 js 的一種形式,代碼從 doGet 開始function doGet() {return HtmlService.createTemplateFromFile('gindex').evaluate();}function include(filename) { return HtmlService.createHtmlOutputFromFile(filename) .getContent();}另一個是html:<!DOCTYPE html><script>window.addEventListener('load', function() { console.log('Page is loaded');});</script>好的,現在的問題。當前結果只是一個空白頁,甚至沒有打印文本。到目前為止,我還沒有嘗試過任何能取得很大成功的方法,到目前為止,我已經在 css 文件上工作以嘗試修復它。我做過研究,但在谷歌腳本上找不到太多。代碼的目標是在網站內部顯示谷歌主頁,我一直將其部署為網頁。這是我的第一篇文章如果您有任何問題我可以回答或測試請告訴我
查看完整描述