Can't have link in Embedded web app in Google site?

允我心安 提交于 2020-06-14 03:26:55

问题


I'm trying to integrate a google script app deployed as a web app in a Google Site. The embedding feature works well and all seems good at first. But for some reason links don't work in the embedded view. I can't find any specific topics about this.

Google Script web app can be embedded every where I tried except in Google Site. And Google Site can embed every site that allow it except web app from google script.(couldn't figure out what you trying to say here...Cooper)

EDIT (2)

Turn out the problem can be resolved pretty quickly :

  1. Open https://site.google.com and create a new site

  2. Insert an "embed" choose the "embed code" option and copy past this code :

    Click Me!

  3. Now testing on preview or once the site publish the link can't be clicked


回答1:


You have to specified the target propriety. Google script dont apply it by default so use this code :

<!DOCTYPE html>
<html>
 <body>
   <div>
     <a target="_self" href="http://google.com">Click Me!</a>
   </div>
 </body>
</html>


来源:https://stackoverflow.com/questions/62039486/cant-have-link-in-embedded-web-app-in-google-site

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!