Articulos PHP
- 1.7 Enunciado exit o die.
- 1 PHP
- 1.1 Variables en PHP
- 2.8 Usar funciones para código redundante.
- 1.2 Enunciados de salida echo.
Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 128
Articulos Jquery
- 2.1 El selector $(this).
- 3.1 Callback en Jquery
- 1.4 El evento click
- 1.9 El elemento on.
- 2.2 Introduciendo texto usando el método .text().
Warning: Use of undefined constant jquery - assumed 'jquery' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 137
Articulos CSS
- 1 Hojas de estilo CSS.
- 1.2 Estructura de los estilos CSS.
- 1.1 Como incluir estilos en una página web.
Warning: Use of undefined constant css - assumed 'css' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 146
Articulos Mysql
- 3 Actualizar valores con UPDATE.
- 4.1 Eliminando privilegios de una cuenta.
- 2.6 Combinando resultados con UNION ALL.
- 2.7 Conjunción interna de tablas.
- 2.5 Seleccionando filas con NOT LIKE.
Warning: Use of undefined constant mysql - assumed 'mysql' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 155
Warning: Use of undefined constant tema - assumed 'tema' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 199
Warning: Use of undefined constant tema - assumed 'tema' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 220
Warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 220
1.6 El método preventDefault().
El método preventDefault() se utiliza para impedir que un determinado evento se ejecute con normalidad, es decir, hace que un determinado evento se interrumpa. Recordemos que un evento puede ser cualquier acción realizada por el usuario.Ahora para entender su funcionamiento, supongamos que deseamos tener un campo de texto y que deseamos que no se pueda introducir texto dentro de este último (algo muy extraño, pero ilustrativo), el campo de texto serÃa el siguiente:
 <input type=”text” size=”30” class=”campoPrueba”/>
Entonces el código Jquery necesario serÃa el siguiente:
$(document).ready(function(){
        $(“.campoPrueba”).keypress(function(evento){
                      evento.preventDefault();
          });
});
El código consiste en lo siguiente:
- La primera parte $(document).ready(function(){}); permite que el código de Jquery se ejecute hasta que se haya descargado correctamente todo el código HTML.
- La segunda parte $(“.campoPrueba”).keypress(function(evento){…}); es la encargada de contener el código a ejecutarse cada vez que el usuario ingrese un carácter. Es importante mencionar que evento hace referencia a la acción llevada a cabo por el usuario, en este caso, ingresar un carácter.
- La tercera y última parte evento.preventDefault(); se encarga de impedir que el evento de ingresar un carácter se lleve a cabo.
Warning: Use of undefined constant tema - assumed 'tema' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 225
El método preventDefault.
Warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 225
1.6



