//--版权:raincome00--
//var xml = cls_xmlhttp();
//xml.idname = "web_main_content";
//xml.url = "/cgi/main/register.asp";
//xml.querystring = "action=regidcheck&id=id1";
//xml.querystring = escape("action=regidcheck");
//xml.main();
function cls_xmlhttp() {
var vobject = new Object();
vobject.type = false;
vobject.method = "post";
vobject.url = "";
vobject.querystring = "";
vobject.result = "";
vobject.idname = "";
vobject.fun = function(string){};
vobject.funwait = function(){};
var vobjxmlhttp = function(){
var vobj;
var varyactivename = new Array("MSXML2.XMLHTTP","Microsoft.XMLHTTP");
if(window.XMLHttpRequest){
//针对FireFox\Mozillar\Opera\Safari\IE7\IE8
vobj = new XMLHttpRequest();
//修正某些浏览器的bug
if(vobj.overrideMimeType){
vobj.overrideMimeType("text/html");
}
}else if(window.ActiveXObject){
//针对IE5\IE6
for(var i=0;i
vobj = new ActiveXObject(varyactivename[i]);
break;
}catch(e){}
}
}
return vobj;
}
vobject.main = function(){
var vobjxml = vobjxmlhttp();
if(!vobjxml){
alert("尊敬的客户:您的浏览器不支持插件!");
return false;
}else if(vobject.url == ""){
alert("程序错误:未设定网址!");
return false;
}
vobjxml.onreadystatechange = function(){
//判断对象状态是否交互完成
if(vobjxml.readyState == 4){
//判断对象是否交互成功
if(vobjxml.status == 500 || vobjxml.status == 200 || vobjxml.status == 0){
//接受服务器输出的纯文本数据
vobject.result = vobjxml.responseText;
if(vobject.type){
vobject.fun(vobject.result);
}else{
if(vobject.idname != ""){
try{
document.getElementById(vobject.idname).innerHTML = vobject.result;
}catch(e){
alert("程序错误:HTML对象不存在!")
}
try{
if(vobject.result.indexOf("") > 0) {
eval(vobject.result.substring(vobject.result.indexOf("")));
}
}catch(e){
alert("程序错误:JAVASCRIPT脚本错误!")
}
}else{
alert("程序错误:未设置HTML对象!")
}
}
}else if(vobjxml.status == 404){
alert("连接错误:目标网址不能连接!")
}
}else{
vobject.funwait();
}
}
vobject.method = vobject.method.toUpperCase();
if(vobject.method != "GET"){
vobject.method = "POST";
}
if(!vobject.type){
vobject.type = false;
}else{
vobject.type = true;
}
if(vobject.method == "POST"){
vobjxml.open("POST",vobject.url,true);
vobjxml.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
vobjxml.send(vobject.querystring);
}else{
vobjxml.open("GET",vobject.url+"?"+xml.querystring,true);
vobjxml.send(null);
}
return true;
}
return vobject;
}
你可以直接写加一个div,然后把页面直接放到div里就可以 了
试试用jqury的ajax,用load方法。
include 引用、
js不知道,但是frameset也可以实现