$(document).ready(function () {
    // for memory.html
    $("#memory-span").click(function () {
        $("#memory-span").css("color", "#000000");
        $("#memory-span").siblings().css("color", "#cccccc");
        $("#memory").siblings().hide();
        $("#memory").show();
    });
    $("#swap-span").click(function () {
        $("#swap-span").css("color", "#000000");
        $("#swap-span").siblings().css("color", "#cccccc");
        $("#swap-info").siblings().hide();
        $("#swap-info").show();
    });

    // for disks.html
    $("#disk-span").click(function () {
        $("#disk-span").css("color", "#000000");
        $("#disk-span").siblings().css("color", "#cccccc");
        $("#disks").siblings().hide();
        $("#disks").show();
    });
    $("#part-span").click(function () {
        $("#part-span").css("color", "#000000");
        $("#part-span").siblings().css("color", "#cccccc");
        $("#parts").siblings().hide();
        $("#parts").show();
    });
    $("#disk-io-span").click(function () {
        $("#disk-io-span").css("color", "#000000");
        $("#disk-io-span").siblings().css("color", "#cccccc");
        $("#disk-io").siblings().hide();
        $("#disk-io").show();
    });

    // for network.html
    $("#network-span").click(function () {
        $("#network-span").css("color", "#000000");
        $("#network-span").siblings().css("color", "#cccccc");
        $("#network-info").siblings().hide();
        $("#network-info").show();
    });
    $("#connections-span").click(function () {
        $("#connections-span").css("color", "#000000");
        $("#connections-span").siblings().css("color", "#cccccc");
        $("#connections-info").siblings().hide();
        $("#connections-info").show();
    });
});
@@ -33,1729 +33,323 @@
     
-// for memory.html%0A    $(%22#memory-span%22).click(function () %7B%0A        $(%22#memory-span%22).css(%22color%22, %22#000000%22);%0A        $(%22#memory-span%22).siblings().css(%22color%22, %22#cccccc%22);%0A        $(%22#memory%22).siblings().hide();%0A        $(%22#memory%22).show();%0A    %7D);%0A    $(%22#swap-span%22).click(function () %7B%0A        $(%22#swap-span%22).css(%22color%22, %22#000000%22);%0A        $(%22#swap-span%22).siblings().css(%22color%22, %22#cccccc%22);%0A        $(%22#swap-info%22).siblings().hide();%0A        $(%22#swap-info%22).show();%0A    %7D);%0A%0A    // for disks.html%0A    $(%22#disk-span%22).click(function () %7B%0A        $(%22#disk-span%22).css(%22color%22, %22#000000%22);%0A        $(%22#disk-span%22).siblings().css(%22color%22, %22#cccccc%22);%0A        $(%22#disks%22).siblings().hide();%0A        $(%22#disks%22).show();%0A    %7D);%0A    $(%22#part-span%22).click(function () %7B%0A        $(%22#part-span%22).css(%22color%22, %22#000000%22);%0A        $(%22#part-span%22).siblings().css(%22color%22, %22#cccccc%22);%0A        $(%22#parts%22).siblings().hide();%0A        $(%22#parts%22).show()
+setInterval(refresh, 3000);%0A%7D);%0A// auto refresh page%0Avar autoRefresh = false;%0Afunction refresh() %7B%0A    if (autoRefresh) %7B%0A        return
 ;%0A    %7D
-);
 %0A    $
-(%22#disk-io-span%22).click(function () %7B%0A        $(%22#disk-io-span%22).css(%22color%22, %22#000000%22);%0A        $(%22#disk-io-span%22).siblings().css(%22color%22, %22#cccccc%22);%0A        $(%22#disk-io%22).siblings().hide();%0A        $(%22#disk-io%22).show();%0A    %7D);%0A%0A    // for network.html%0A    $(%22#network-span%22).click(function () %7B%0A        $(%22#network-span%22).css(%22color%22, %22#000000%22);%0A        $(%22#network-span%22).siblings().css(%22color%22, %22#cccccc%22);%0A        $(%22#network-info%22).siblings().hide();%0A        $(%22#network-info%22).show();%0A    %7D);%0A    $(%22#connections-span%22).click(function () %7B%0A        $(%22#connections-span%22).css(%22color%22, %22#000000%22);%0A        $(%22#connections-span%22).siblings().css(%22color%22, %22#cccccc%22);%0A        $(%22#connections-info%22).siblings().hide();%0A        $(%22#connections-info%22).show();
+.ajax(%7B%0A        url: location.href,%0A        cache: false,%0A        dataType: %22html%22,%0A        success: function (resp) %7B%0A            $(%22.sysinfo%22).html(resp);%0A        %7D
 %0A   
@@ -350,14 +350,12 @@
  %7D%0A    %7D);%0A%7D
-);

修改 js 自动刷新