Ver Mensaje Individual
  #10 (permalink)  
Antiguo 10/02/2010, 14:15
Avatar de mayid
mayid
Colaborador
 
Fecha de Ingreso: marzo-2009
Ubicación: BsAs
Mensajes: 4.014
Antigüedad: 15 años, 1 mes
Puntos: 101
Respuesta: funcion .click()

Fijate en esta estructura:

Cita:
$(document).ready(function(){


function datos(){
user = $("#txtusuario").val();
pass = $("#txtpass").val();
$("#mensaje").load("login_m.php",
{
'user':user,
'pass':pass
});
};

$('form input').keypress(function(event) {
if(event.which == 13) {
datos(); // se dispara solo si la tecla es enter
} });

$('#btnentrar').click(function(){
datos(); // se dispara on click
});

});