Pages

Javascripting

Monday, 17 August 2015

JavaScript is the programming language of HTML and the Web.
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

Subscribe To Newsletter

 
web hosting ebiz pro

Most Reading