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>Callback in AJAX</title> | |
<script> | |
var xmlhttp; | |
//Se declara la funcion principal con sus parametros | |
function loadXMLDoc(url, callFunction) { |
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
<!--@authot Javier Madrid--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> De Fahrenheit a Celsius</title> | |
</head> | |
<body> | |
<script> | |
//Asignando valor a variable | |
var cTemp = 100; |
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> | |
<meta charset="UTF-8"> | |
<title> Evento On Click</title> | |
</head> | |
<body> | |
<input type="button" value="Púlsame" onclick="alert('Soy un evento')" /> | |
</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> | |
<meta charset="UTF-8"> | |
<title>Hola mundo de Javascript</title> | |
</head> | |
<body> | |
<script> | |
//Alerta en una ventana emergente |
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> Evento de información </title> | |
<script> | |
function infoButton(buttonId, buttonName, buttonValue) { | |
var idButton = "ID del boton " + buttonId + " \n"; | |
var nameButton = "Button's name: " + buttonName + " \n"; | |
var valueButton = "Button's value: " + buttonValue + " \n"; |
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>Return Function</title> | |
<script> | |
function circleArea(r) { | |
this.r = r; | |
return 3,1416 * (r * r); | |
} | |
</script> |
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
//Playing with call() method from JS | |
function sayFavoriteFood() { | |
console.log(this.sayFavoriteFood); | |
} | |
// create a desmond object | |
var javier = { | |
favoriteFood: 'kiwi'; |
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
<!--(method - filter())--> | |
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>Function as a Parameter - Lambdas</title> | |
<script src="main.js"></script> | |
</head> | |
<body> |
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> |
OlderNewer