This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Oriented Object Programming</title> | |
<script type="text/javascript"> | |
//Creating an objetc | |
objeto = new Object(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Arguments to construct functions</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
//My object function with parameters | |
function Book(title, edition, year) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript"> | |
//Creating my object function | |
function myObject() { | |
//Setting myObject as parent of info while it gets a string | |
this.info = "My object info"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Inheritance from a build Function in JS</title> | |
<script type="text/javascript"> | |
String.prototype.reverse = function() { | |
var salida = ""; | |
for (var i = this.length-1; i >= 0; i--) { | |
salida += this.substr(i, 1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Ajax Suggestion</title> | |
<script> | |
//Declaro la funcion con un parametro que tomara el string que se coloque en el input | |
function showHint (srt) { | |
//Si no hay nada escrito que devuelta vacio | |
if (srt.length == 0) { | |
document.getElementById("txtHint").innerHTML=""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>JSON practice</title> | |
<script src="json.json"></script> | |
</head> | |
<body> | |
<script> | |
//Access to information in json object | |
document.write('Javier is ' + jason.age); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Document History</title> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<script> | |
function go() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>in_array in JS</title> | |
</head> | |
<body> | |
<script> | |
//Se asigna la funcion agregandole una propiedad de arreglo al objeto. | |
Array.prototype.inArray = function() { | |
//para la variable en este caso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Arguments Demo</title> | |
<script src="arguments.js" spinner="spinner.png"></script> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>Fuction as a Return</title> | |
</head> | |
<body> | |
<script src="returnFunction.js"></script> | |
</body> | |
</html> |