This file contains hidden or 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
utils = { | |
//limpia un numero de comas, puntos, espacios en blanco, símbolos de dollar y euro | |
limpiaInteger : function (valor) { | |
nuevoValor = valor.replace(",",""); //quita comas | |
nuevoValor = nuevoValor.replace(".",""); //quita puntos | |
nuevoValor = nuevoValor.replace("$",""); //quita símbolo dollar | |
nuevoValor = nuevoValor.replace("€",""); //quita símbolo euro | |
nuevoValor = nuevoValor.replace(/ /g,''); //quita espacios en blanco | |
return nuevoValor; |
This file contains hidden or 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
//Ante dos elementos que llaman a la misma funcion: | |
document.getElementById('elem1').onchange = validarInput; | |
document.getElementById('elem2').onchange = validarInput; | |
function validarInput(e){ | |
var oEvent = e || window.event; | |
var elem = oEvent.target || oEvent.srcElement; | |
//En el caso de que elem1 o elem2 sean inputs de un formulario se podria: |
This file contains hidden or 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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Plantilla básica</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
</head> | |
<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" style="margin:0px 0px 0px 0px;padding:0px 0px 0px 0px;"> | |
<!-- | |
Se utiliza XHTML 1.0 Transitional, así que ojo con la sintaxis. |
This file contains hidden or 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
/* | |
Este script evita que al pulsar sobre la tecla retroceso cuando estamos sobre un submit, o input text que sea | |
readonly el navegador haga un pageback. | |
Compatible desde IE7 | |
Como añade un listener al documento está desarrollado con javascript puro por eficiencia. | |
*/ | |
(function(d){ | |
if(d.addEventListener) { | |
d.addEventListener('keydown',noPageBack,false); | |
} else { |
This file contains hidden or 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
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" | |
codebase="http://www.apple.com/qtactivex/qtplugin.cab" | |
width="200" height="16"> | |
<param name="src" value="movie.mov" /> | |
<param name="autoplay" value="true" /> | |
<param name="pluginspage" value="http://www.apple.com/quicktime/download/" /> | |
<param name="controller" value="true" /> | |
<!--[if !IE]> <--> | |
<object data="movie.mov" width="200" height="16" type="video/quicktime"> | |
<param name="pluginurl" value="http://www.apple.com/quicktime/download/" /> |
This file contains hidden or 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
<object type="video/x-ms-wmv" | |
data="movie.wmv" | |
width="320" height="260"> | |
<param name="src" | |
value="movie.wmv" /> | |
<param name="autostart" value="true" /> | |
<param name="controller" value="true" /> | |
</object> |
This file contains hidden or 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
<!-- básico --> | |
<a href="mailto:[email protected]">Email Us</a> | |
<!-- con asunto --> | |
<a href="mailto:[email protected]?subject=Mail from Our Site">Email Us</a> | |
<!-- con CC y BCC --> | |
<a href="mailto:[email protected][email protected], [email protected], [email protected]&[email protected]&subject=Big%20News">Email Us</a> | |
<!-- con contenido --> |
This file contains hidden or 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
<form method="post" action="upload.php" enctype="multipart/form-data"> | |
<input name='uploads[]' type="file" multiple> | |
<input type="submit" value="Send"> | |
</form> |
This file contains hidden or 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
<form action="iframe.php" target="my-iframe" method="post"> | |
<label for="text">Some text:</label> | |
<input type="text" name="text" id="text"> | |
<input type="submit" value="post"> | |
</form> | |
<iframe name="my-iframe" src="iframe.php"></iframe> |
OlderNewer