首页 > 解决方案 > 使用 Shiny APP 中用户的输入更新 URL

问题描述

我正在使用一个闪亮的应用程序,我想创建一个带有操作按钮的查询,该按钮根据用户输入更新 url(在本例中为 textInput input$query_user)。

例如这是我的ip:http: //127.0.0.1 :6858

并且在用户填写之后textInput,单击一个操作按钮,它会将 url 上传到http://127.0.0.1:6858/?lookfor=query_user

我看过这篇文章: R shiny: Add weblink to actionButton

但它不起作用,因为该示例没有读取我的输入。

actionButton(inputId='query_button',
             label="Search", 
             icon = icon("th"), 
             onclick = paste("location.href='http://127.0.0.1:6858?lookfor=",
                             input$query_user, "'", sep="))
  )
)

标签: rshiny

解决方案


推荐阅读