是否可以使用 lua 在电晕中进行 "a href"

Is it possible to do a "a href" in corona using lua

我是 Corona 的新手并且 Lua。
是否可以在 Lua 中做类似 "a href" 的事情?我有一个按钮,我需要它 link 它到其他页面,但我似乎无法找到一种方法来做到这一点。我并不是要将 HTML 代码注入 Lua。我只需要一种方法来执行这样的功能(使用 Lua 语言)。我用谷歌搜索甚至查看了 Lua 和 corona 文档的手册,但仍然找不到类似的内容。
知道这方面的人,请指教。谢谢

点击一个按钮会引发一个事件。您可以实现一个函数来处理此事件,例如显示另一个页面。请阅读 Corona 手册并做一些基本教程。您需要的所有信息都在那里。

发件人:https://docs.coronalabs.com/api/library/widget/newButton.html

onPress (optional) Listener. An optional function to be called when the button is pressed. The callback function does not require testing for event.phase since it only honors "began".

https://docs.coronalabs.com/api/type/Listener.html

Events are dispatched to listeners. Event listeners can be either functions or table objects.

In both cases, when an event occurs, the listener will be invoked and be supplied with a table representing the event. All events have a name property that corresponds to the name you use to register the event.

For more information, see the Basic Interactivity and Event Detection guide.

https://docs.coronalabs.com/guide/events/detectEvents/index.html

要了解如何切换"pages"或场景阅读

https://docs.coronalabs.com/guide/system/composer/index.html

在按钮中添加引用:

本地按钮=

div {

  a{["data-toggle"]="modal", 
   ["data-backdrop"]="static",
    href="#refrence-modal",
 }

或者,您可以在表单中添加按钮:-

  1. 定义表单的动作
  2. 将按钮类型设置为提交