分享

机顶盒ajax数据处理(iPanel)

 Blex 2011-03-11

<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312"

/>
    <title>无标题文档</title>
    <style type="text/css">

.cat-1 td {height:22px;width:22px;color:#000;font-size:16px;

background-image:url(images/pro-01.png); text-align:center; }
.cat-1 td a:link{color:#000;}
.cat-1 td a:visited{color:#fff;}
.cat-1 td a:hover{color:#fff;}
.bgSeries {
 BACKGROUND-IMAGE: url(images/pro-01.png); WIDTH: 22px; LINE-

HEIGHT: 22px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 22px; TEXT-ALIGN:

center
}
</style>
    
 
</head>
<body style="margin: 60px 0px 0px 0px; background-repeat: no-repeat;"

background="images/new-by.png" >
   
 
 <script language="javascript">
 var xmlHttp = false;
function MakeHttpRequest()
{
 return (window.ActiveXObject) ? new window.ActiveXObject

("microsoft.xmlhttp") : new window.XMLHttpRequest();
}
 
xmlHttp = MakeHttpRequest();
function callServer() {
 
  var url = "ypsq/TvDSJDetailes.html";
  xmlHttp.open("GET", url, true);
  xmlHttp.setRequestHeader( "Content-Type", "text/html;charset=gb2312"

);
  xmlHttp.onreadystatechange = updatePage;
  xmlHttp.send(null);
}

 

function updatePage() {
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
    var match = response.match(/<body[^>]*>([\s\S]*?)<\/body>/i);
  //取<body>与</body>之间的字符
   response = (match) ? match[1] : response;
  // alert(response);
    document.getElementByIdx("content").innerHTML = response.replace

("../images","images");
  }
}

</script>
 <input id="Button1" type="button" value="button"  onclick="callServer

();"/>
 <div id="content"></div>
  
</body>


</html>

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多