Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

281
Vistas
Why button onlick does nothing in Jade/pug

Why my button onclick does nothing? [enter image description here][1]

doctype html
html
  head
  block content
   script.
    function changeToTextBox(){
        alert("Testing");
    }
    title User
    welcome #{name}
  body
  button(onclick="changeToTextBox()") Edit
  form(name="searchFrm", method="post")
     input(type='text', name='email')
     input(type='submit', name='search')
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Fix your indentation.

doctype html
html
  head
    block content
     script.
      function changeToTextBox(){
          alert("Testing");
      }
    title User
    
  body
    p welcome #{name}
    button(onclick="changeToTextBox()") Edit
    form(name="searchFrm", method="post")
       input(type='text', name='email')
       input(type='submit', name='search')

And use a compiler like https://pughtml.com/ to view the HTML output so you can better see what's wrong.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda