Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
¿Hay alguna forma de replicar el código HTML en shiny?

Estoy tratando de replicar el código HTML en shiny. Pero no funciona. Pero HTML puro sin obras brillantes. Básicamente, lo que sea que ponga en el cuadro, el typeof debería regresar.

Puede consultar mi publicación anterior aquí Obtenga el tipo de valor ingresado

 library(shiny) library(shinydashboard) library(shinyjs) ui <- dashboardPage( dashboardHeader(title = "Basic dashboard"), dashboardSidebar(collapsed = TRUE), dashboardBody( HTML('<p id="res">Value</p><input type="text" id="fname" name="fname"><br><br>'), tags$script( "document.getElementById('fname').addEventListener('input', e => { const value = e.currentTarget.value; const checkType = isNaN(Number(value)) ? value : Number(value) document.getElementById('res').textContent = typeof checkType })"), useShinyjs(), actionButton("release", "Release")) ) server <- function(input, output) { observeEvent(input$release,{ # tags$head(tags$script("$('body').toggleClass('sidebar-collapse');")) toggleClass(selector = 'body', class = 'sidebar-collapse') # js$toggleCollapse() }) } shinyApp(ui, server)
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!