$(function () {
    //首次加载
    getKnowledge();

    //获取tab信息
    function getKnowledge() {
        $.ajax({
            type: "POST",
            url: "Ajax/Interact.ashx",
            data: { com: 'getknowledge' },
            datatype: "json",
            beforeSend: function (data, textStatus) {
                $("#KnowledgeBox").html("<span class=\"V\">数据正在远程加载中…</span>");
            },
            success: function (data, textStatus) {
                var JosnData = eval(data);
                $("#KnowledgeBox").html("");
                var ShowHtml = "";
                if (JosnData != null) {
                    if (JosnData.length > 0) {
                        for (var i = 0; i < JosnData.length; i++) {
                            ShowHtml += "<li>";
                            ShowHtml += "<span class=\"H B\">" + JosnData[i].title + "</span><br />";
                            ShowHtml += "<span class=\"V\">" + JosnData[i].content + "</span>";
                            ShowHtml += "</li>";
                        }
                    } else {
                        ShowHtml += "<li>暂无数据</li>";
                    }
                }
                $("#KnowledgeBox").html(ShowHtml);

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) { alert(errorThrown); }
        });
    }

});