+ 1
I was trying to code a simple calculator. But how can i get value evaluated when i press buttons and they could be seen in res?
2 Respostas
+ 2
You have to write a function and use it on "onclick" event of button.
Example:
//Html
<button onclick="myFunc()">Click me</button>
//Js
function myFunc() {
console.log("You clicked me..");
}
+ 2
Bro you see my first post . There I had made a simple calculator you can see.