function createobj() {
if (window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
return new XMLHttpRequest();
}
}
function getNotice(url) {
var oBao=createobj();
var my_url=url;
oBao.open('get',my_url,false);
oBao.onreadystatechange=function(){
if(oBao.readyState==4){
if(oBao.status==200){
var returnStr=oBao.responseText;
var Temps=gethtml(returnStr);
document.write(Temps);
}else{
document.write("未找到您输入的地址或服务器505错误!");
}
}
}
oBao.send(null);
}
//将str中的asp网址按照正则替换
function gethtml(str){
var Temp_str=str.replace(id,'$1_$2.html');
Temp_str=Temp_str.replace(/index\.asp/gi,'index.html');
Temp_str=Temp_str.replace(/myfiles\.asp/gi,'myfiles.html');
Temp_str=Temp_str.replace(/mydiary\.asp\?typ\=self/gi,'mydiary_self.html');
Temp_str=Temp_str.replace(/mydiary\.asp/gi,'mydiary.html');
Temp_str=Temp_str.replace(flag,'$1.rss');
Temp_str=Temp_str.replace(/xml_diary\.asp/gi,'xml_diary.html');
Temp_str=Temp_str.replace(/xml_download\.asp/gi,'xml_download.html');
Temp_str=Temp_str.replace(/xml_links\.asp/gi,'xml_links.html');
Temp_str=Temp_str.replace(/xml_ly\.asp/gi,'xml_ly.html');
Temp_str=Temp_str.replace(/ly\.asp/gi,'ly.html');
//Temp_str=Temp_str.replace(/href=\"(http){0}/gi,'href="http://blog.ii-home.cn/');
return(Temp_str);
}
//将URL替换成原地址
function getasp(str){
var Temp_str=str.replace(re_id,'$1.asp?id=$2');
Temp_str=Temp_str.replace(/index\.html/gi,'index.asp');
Temp_str=Temp_str.replace(/myfiles\.html/gi,'myfiles.asp');
Temp_str=Temp_str.replace(/mydiary\.html/gi,'mydiary.asp');
Temp_str=Temp_str.replace(/mydiary\_self.html/gi,'mydiary.asp?typ=self');
Temp_str=Temp_str.replace(/xml_diary\.html/gi,'xml_diary.asp');
Temp_str=Temp_str.replace(/xml_download\.html/gi,'xml_download.asp');
Temp_str=Temp_str.replace(/xml_links\.html/gi,'xml_links.asp');
Temp_str=Temp_str.replace(/xml_ly\.html/gi,'xml_ly.asp');
Temp_str=Temp_str.replace(/ly\.html/gi,'ly.asp');
Temp_str=Temp_str.replace(re_flag,'$1.asp?flag=xml');
return(Temp_str);
}
script>