﻿// JScript 文件

function loadd(rid1)
{
    document.getElementById("btnmune").innerHTML = "数据加载中...."; 
     document.getElementById("content").innerHTML = "数据加载中....";     
        //
    //页面打开时加载数据
    dealActsT("load2.Aspx?id="+rid1);
   
    
}


// JavaScript Document
var xmlHttpT;

function createXMLHttpRequestsT() { //创建一个xmlHttpRequest对象
    if (window.ActiveXObject) {
        xmlHttpT = new ActiveXObject("Microsoft.XMLHTTP");
    } 
    else if (window.XMLHttpRequest)
    {
        xmlHttpT = new XMLHttpRequest();
    }
}

function dealActsT(url){
     //请求页面url
    
    createXMLHttpRequestsT();
    xmlHttpT.onreadystatechange = handleStateChangesT; //请求状态改变事件触发handleStateChange功能
    xmlHttpT.open("GET",url); //采用get方法提交数据
    xmlHttpT.send(null);
   // alert(url+"&"+Math.random());
}

function handleStateChangesT(){
    if(xmlHttpT.readyState == 4){    //表示请求状态 4为完成
            if(xmlHttpT.status == 200)
            { //http状态指示码，200表示ok
                     // document.getElementById("d").innerHTML = xmlHttp.responseText; //将服务器返回信息作为文本插入到infoId指示的容器中。
                    //显示数据         
                    document.getElementById("btnmune").innerHTML = xmlHttpT.responseText.split('|')[0];
                    document.getElementById("content").innerHTML = xmlHttpT.responseText.split('|')[2];
                    if(xmlHttpT.responseText.split('|')[1]== "")
                    {
                        document.getElementById("showimg").style.display ="none";                        
                    }
                    else
                    {
                        document.getElementById("showimg").style.display = "";
                        document.getElementById("showimg").src = xmlHttpT.responseText.split('|')[1];
                        
                    }  
                                    
                }
        }
        else"";
}