【问题标题】:Clickable hyperlink Shiny R可点击的超链接 Shiny R
【发布时间】:2017-03-29 15:03:57
【问题描述】:

我已尝试使用此代码在 Shiny Dashboard 中创建一个可点击的超链接,但由于某种原因,该图像没有显示(我得到一个问号类型的图标,但它是超链接的)

`dashboardBody(

tabItems(
tabItem("icratio",
        fluidRow(
          a(img(src="image.png"), href="https://google.com")

        )
)
 )
)`

可能是什么问题?

【问题讨论】:

  • image.png是在\www文件夹下,还是和代码在同一个文件夹下?
  • 只在应用文件夹中。我们需要创建一个 www 文件夹吗?
  • 是的 - 在您的应用程序的文件夹中创建一个名为 www 的文件夹,然后将图像文件放入其中。我相信这应该可以解决问题。

标签: r shiny shiny-server shinydashboard shinyjs


【解决方案1】:

放置 tags$a 应该可以。

tabItem("icratio",
    fluidRow(
      tags$a(img(src="image.png"), href="https://google.com")
    )
)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-26
    • 2014-01-21
    • 2012-10-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-07
    相关资源
    最近更新 更多