A push button that activates a JavaScript when it is clicked.
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h1>Show a Push Button</h1>
<p>The button below activates a JavaScript function when it is clicked.</p>
<form>
<input type="button" value="Click me" onclick="msg()">
</form>
<script>
function msg() {
alert("Hello world!");
}
</script>
</body>
</html>
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded by: | Admin |