📜  更新 html 页面而不刷新 - Html 代码示例

📅  最后修改于: 2022-03-11 14:52:52.407000             🧑  作者: Mango

代码示例1
$(function(){
    // don't cache ajax or content won't be fresh
    $.ajaxSetup ({
        cache: false
    });
    var ajax_load = "loading...";

    // load() functions
    var loadUrl = "http://fiddle.jshell.net/deborah/pkmvD/show/";
    $("#loadbasic").click(function(){
        $("#result").html(ajax_load).load(loadUrl);
    });

// end  
});