Programming makes computers do what you want them to do.
JavaScript is easy to learn.
An example of Javascript:
My First JavaScript
The example use the following code:
<h1>My First JavaScript</h1>
<button type="button"
onclick="document.getElementById('demo').innerHTML = Date()">
Click me to display Date and Time.</button>
<p id="demo"></p>
Another example of Javascript on button click.
<script>
function myFunction() {
window.alert('You clicked the button!');
}
</script>
<button onclick="myFunction()" type="button">Click Me!
</button>
No comments:
Post a Comment