parent
e1b1c2e5f9
commit
99c012cfca
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<form>
|
||||
<input type="button" value="touch me" onClick="alert('ahh!'); alert('two times!');"/>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body onLoad="alert('goodbye');">
|
||||
text etxt et xtsa dasdasdasda
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
var tuna = "hey i am autna fish!";
|
||||
document.write(tuna.length);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
function person(name, age){
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
var bucky = new person("Bucky Roberts", 24);
|
||||
var taylor = new person("Taylor Swift", 20);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
document.write(taylor.age);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
var bucky = {name: "Bucky Roberts", age: 24};
|
||||
var taylor = {name: "Taylor Swift", age: 20};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
document.write(bucky.name + " loves " + taylor.name + " because she is " + taylor.age);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
function people(name, age){
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
this.yearsUntilRetire = yearsLeft;
|
||||
}
|
||||
|
||||
function yearsLeft(){
|
||||
var numYears = 65 - this.age;
|
||||
return numYears;
|
||||
}
|
||||
|
||||
var natalie = new people("Natalie Portman", 28);
|
||||
var bucky = new people("Bucky roberts", 24);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
document.write(bucky.yearsUntilRetire());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
var people = new Array("Bucky", "Tommy", "Sarah", "Hanah", "Mikety");
|
||||
document.write(people[0]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
var stuff = new Array();
|
||||
var x = 9;
|
||||
var tuna = 65 - 54;
|
||||
stuff[0] = "baconator";
|
||||
stuff[1] = "old pumpkins";
|
||||
|
||||
document.write(stuff[1]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue