相关疑难解决方法(0)

R shiny:将weblink添加到actionButton

我的闪亮应用程序中有一个框,其中有一个按钮,包含在闪亮的仪表板框中,如下所示:

shiny::fluidRow(
  shinydashboard::box(title = "Intro Page", "Some description...", 
      shiny::actionButton(inputId='ab1', label="Learn More", icon = icon("th"))
  )
)
Run Code Online (Sandbox Code Playgroud)

我想在按钮中包含一个weblink,这样当我点击它时,它应该在一个新标签中打开相应的网页.

我知道我可以这样做:

# this does not create a submit button though, it just creates a link.
tags$div(class = "submit",
         tags$a(href = "www.google.com", 
                "Learn More", 
                target="_blank")
)
Run Code Online (Sandbox Code Playgroud)

但是使用actionButton,有一个很好的按钮,我可以添加一个看起来更美观的图标.

在此输入图像描述

如何在有光泽的情况下添加actionButton的链接?

html r hyperlink action-button

15
推荐指数
2
解决办法
8166
查看次数

标签 统计

action-button ×1

html ×1

hyperlink ×1

r ×1