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
//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 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 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 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 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 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:someone@yoursite.com">Email Us</a> | |
<!-- con asunto --> | |
<a href="mailto:someone@yoursite.com?subject=Mail from Our Site">Email Us</a> | |
<!-- con CC y BCC --> | |
<a href="mailto:someone@yoursite.com?cc=someoneelse@theirsite.com, another@thatsite.com, me@mysite.com&bcc=lastperson@theirsite.com&subject=Big%20News">Email Us</a> | |
<!-- con contenido --> |
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
<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 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> |
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
<!-- first try HTML5 playback: if serving as XML, expand `controls` to `controls="controls"` and autoplay likewise --> | |
<!-- warning: playback does not work on iOS3 if you include the poster attribute! fixed in iOS4.0 --> | |
<video width="640" height="360" controls> | |
<!-- MP4 must be first for iPad! --> | |
<source src="__VIDEO__.MP4" type="video/mp4" /><!-- Safari / iOS video --> | |
<source src="__VIDEO__.OGV" type="video/ogg" /><!-- Firefox / Opera / Chrome10 --> | |
<!-- fallback to Flash: --> | |
<object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF"> | |
<!-- Firefox uses the `data` attribute above, IE/Safari uses the param below --> | |
<param name="movie" value="__FLASH__.SWF" /> |
OlderNewer