简体   繁体   中英

Remove the text in a shiny::textInput field on mouse click event

I have a simple textInput:

textInput(inputId = "input1", h4("Name"), value = "Your name")

How can I set an onclick event so that the text completely disappears when the user clicks on the text field? Is this possible via shinyjs::onclick ?

您可以在textInput使用placeholder选项

textInput(inputId =  "input1", label = h4("Name"), placeholder = "Please provide your name...")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM