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')
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.