esercizi js

This commit is contained in:
2014-11-30 18:46:24 +01:00
parent b2e9b46742
commit c30036a3bc
11 changed files with 597 additions and 27 deletions

62
js3.html Normal file
View File

@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script>
var a = 5;
function f(){return a;}
document.writeln(f());
var a = 10;
document.writeln(f());
oggetto = {
nome:"n",
cognome:"c"
}
if ("nome" in oggetto)
document.writeln(oggetto.nome);
f2.counter=0;
function f2(){
document.writeln(arguments.length);
document.writeln(arguments.callee.length);
document.writeln(arguments.callee.counter);
document.writeln(f2.counter);
if (f2.counter < 100){
f2.counter++;
document.writeln("recursive " + f2.counter);
f2();
}
}
f2("a","b","c","d");
</script>
</body>
</html>