Reputation: 1
I am trying to link two pug files but not able to do that and I am using koajs and mongodb
input(type='button', onclick="abc.pug", value='click here')
So can anyone help me?
Upvotes: 0
Views: 443
Reputation: 3228
You can't link to another Pug file. You would link to the HTML file that the desired Pug file compiles to. In your case, you need to link to abc.html
instead of abc.pug
.
EDIT: You're using the onclick
attribute for the button, instead of using an anchor tag to create a link to another page. You need to use an a
tag to link to another page, not a button
.
<a href="abc.html">Click here</a>
onclick
is reserved for running a JavaScript function when the button is clicked. If you need to make it a button and link to something, use CSS to visually style the anchor as if it were a button (e.g. class="button"
).
Upvotes: 1