我的test.Rmd
中有以下代码。
---
title: "Test Application"
runtime: shiny
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: fill
---
sidebar {.sidebar}
==========================
Controllers
-----------------------
```{r}
actionButton("clickMe", label = "Click Me", class = "btn btn-lg btn-primary")
```
Page1
========================
Page2
=======================
最初,我的应用程序位于第1页。我想点击按钮clickMe
将我的应用带到Page2。请帮我这个..!
答案 0 :(得分:4)
您可以使用onClick
这样的参数:
actionButton("clickMe", label = "Click Me", class = "btn btn-lg btn-primary",
onclick="location.href='#section-page2';")