Unit 1. Advanced. Javascript Examples

To proceed, we can see code of a web page example that is very simple and includes Javascript code, the outcome, try yourself pushing the botton :



<SCRIPT LANGUAGE="JavaScript"> // Javascript Code

function Hello() {

alert("That is Flash!");






<INPUT TYPE="button" NAME="Boton" VALUE="Press me" onClick="hello()">




Here you have the code in running order (you will be able to see it if your browser supports Javascript)

Finally, another example, to have an idea about Javascript power, as you have already seen that does not use neither to create web pages no animations... That is the code:

function Question() {

var answer = prompt("What is your name?", "");

if (answer)

alert("Enjoy the Flash Tutorial, " + answer);


And here you have it running


Legal warning: Authorised on-line use only. It is not allowed the use of these courses in companies or private teaching centres.
© aulaClic. All rights reserved. Reproduction in any form whatsoever is prohibited.