Código HTML:
Ver original
<!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 runat="server"> <script Language="JavaScript"> function cargaContenido1() { var ajax = nuevoAjax(); ajax.open("GET", "ajax2.aspx?nombre=Carlos", true); ajax.onreadystatechange = function() { if (ajax.readyState == 4) { alert(ajax.responseText); } } ajax.send(null); } </script> </head> <body onLoad="cargaContenido1()"> <form id="form1" runat="server"> <div> </div> </form> </body> </html>
Código ASP:
Ver original
<!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 runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <%Response.Write(Request("nombre"))%> </div> </form> </body> </html>