shiny: open new browser tab from within shiny app

前端 未结 3 1156
别那么骄傲
别那么骄傲 2021-02-06 16:27

From within shiny I want to open a HTML page in a new browser tab. Here it is pointed out that I need JS for that task. Let\'s say I want to open the URL http://www.google.com

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-06 16:42

    You shouldn't need anything more fancy than traditional, shiny-ified HTML:

    a("test", href="http://google.com", target="_blank")  
    

    You're just looking to set the target attribute on the a tag which tells your browser where to open this new link you created.

提交回复
热议问题