.opaco{ filter: alpha(opacity=50); opacity: .5; }
Destruir sesiones en php
Esto es para hacer el tipico boton de cerrar sesión session_start(); session_unset(); session_destroy(); header("Location: ../index.php"); /* Redirect browser */
Evitar inyecciones SQL
Evitar inyecciones SQL $login=mysql_real_escape_string($_GET['login']); $pass=mysql_real_escape_string($_GET['pass']);
Funciones Jquery imprescindibles
Detectar si un checkbox esta activado (True o False) r=$(‘#identificador’).attr("checked");
Cómo enviar un mail con php con formato HTML
$mail=$_get['email']; $nombre=$_get['nombre']; $mensaje=$_get['mensaje']; $codigohtml = ‘ <style> h2{ font-family:"Helvetica-normal", Arial; font-size:18px; } li{ list-style:none; font-family:"Helvetica-normal", Arial; font-size:11px; } a{ font-family:"Helvetica-normal", Arial; font-size:11px; } .span{ font-family:"Helvetica-normal", Arial; font-size:11px; } span{ font-family:"Helvetica-normal", Arial; font-size:11px; } </style> <html> <head> <title>Mensaje de $nombre</title> </head> <body> <h2>Contactos de
(Read More…)
Imprimir DIV o area con jquery | printArea.js
¿Cómo imprimir un área determinada o un div? Primero tienes que bajarte la librería pinchando aqui <script src="printArea.js"></script> $("div#miDiv").printArea();
Validar el correo con javascript
Código Javascript <script> function isEmailAddress(s) { var filter=/^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+.[A-Za-z0-9_.]+[A-za-z]$/; if (s.length == 0 ) return true; if (filter.test(s)) return true; else alert("Entre una direccion de correo valida"); theElement.focus(); return false; }</script> isEmailAddress("midireccion@dominio.com")
Cómo validar un radio button en javascript
<input type="radio" value="prueba 1" name="metodo"/> <input type="radio" value="prueba 2" name="metodo"/> <input type="radio" value="prueba 3" name="metodo"/> Código javaScript var total,valor; total=document.getElementsByName(‘metodo’).length; for (var i=0;i<total;i++){ valor=document.getElementsByName(‘metodo’).item(i).checked; if (valor){ nom=document.getElementsByName(‘metodo’).item(i).value; alert(nom); } }
Conceptos en marketing online
Listado de palabras en informática: ¿Qué es? CPC: Costes por click CPM: Coste por mil impresiones. CPA: Coste por actividad también conocido por CPL CPD: Coste directo o coste por dia Adsever: Servidor de banner. Tracking: Llamado al seguimiendo de un anuncio o web. Banner: Anuncio para web. Banner cuadrado: Corresponde a un anuncio de
(Read More…)
Función Ajax con Jquery
Función para crear Ajax: function ajax(){ $.ajax({ url: ‘pruebas.txt’, // En necesario crear un fichero a parte con este nombre // success: function(data) { $(‘#prueba’).html(data); // Esto es similar a innerHTML } }); } Dentro del body <input type="button" value="enviar" onclick="ajax()"> <div id="prueba">aqui datos</div>





