кнопка JavaScript
<button onclick="Function()">Text</button>
Defeated Dugong
<button onclick="Function()">Text</button>
<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-secondary">Secondary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-light">Light</button>
<button type="button" class="btn btn-dark">Dark</button>
<button type="button" class="btn btn-link">Link</button>
<!--on html-->
<button>Click Me!</button>
/*js code*/
let btn = document.querySelector('button').addEventListener('click', () => {
console.log('"Ohh!" Button clicked!')
});
<!DOCTYPE html>
<html>
<body>
<h2>Example of button </h2>
<p>This is the example of a button clickon it</p>
<button type="button" onclick="document.write(80+20)">click on me</button>
</body>
</html>
<script>
function myFunction() {
var x = document.createElement("BUTTON");
var t = document.createTextNode("Click me");
x.appendChild(t);
document.body.appendChild(x);
}