如何在没有Appscript中其他页面的URL的情况下使按钮重定向到另一页面

问题描述

有人可以帮我解决以下问题吗?

我正在尝试使用Google的Appscript建立一个包含许多页面的网站。但是我对如何使用按钮重定向到那些页面感到困惑。显然,这将是一个Javascript代码。我正在尝试使用addEventListener函数

 <body>
<div class='container'>
  <h1>Welcome to the Ticket Tracker!</h1>
  <input id='my_input' placeholder="Recipient's Email"><br>
  <input id='my_input_fname' placeholder="First Name"><br>
  <input id='my_input_fname' placeholder="Last Name"><br>
  <button id='my_button_new_ticket'>NEW TICKET</button>
  <button id='my_button_update_ticket'>SEARCH TICKET</button>
  
  <p id='my_paragraph'></p>
  
  <script>
    document.getElementById('my_button_new_ticket').addEventListener('click',_ => {
      window.location.href='index.html'
            
  </script>
</div>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)