If you can't read please download the document
Upload
miguel-angel
View
215
Download
2
Embed Size (px)
DESCRIPTION
Codigo generado
Citation preview
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
var xhr;
function crearObjeto(){
if(window.ActiveXObject){
xhr=new ActiveXObject("Microsoft.XMLHttp");
}else if((window.XMLHttpRequest)|| (typeof XMLHttpRequest)!= undefined){
xhr=new XMLHttpRequest();
}else{
alert('su navegador no soporta AJAX');
return ;
}
enviaPeticion();
}
function enviaPeticion(){
var usuario=document.getElementById("usu").value;
var contrasena=document.getElementById("contra").value;
xhr.open("GET","LoginAcceso?usuario="+usuario+"&&contrasena="+contrasena,true);
xhr.onreadystatechange=verificaDetalle;
xhr.send(null);
}
function verificaDetalle(){
if(xhr.readyState==4){
document.getElementById("detalle").innerHTML=""+xhr.responseText+"";
}
}