Is it possible to load content of page without Refreshing the whole page

后端 未结 3 587
执笔经年
执笔经年 2021-01-25 12:08

Actually i want to refresh my content of a page without Refreshing the whole page through JavaScript or j Query ....... and i did my whole project into ( Php or javaScript) so i

3条回答
  •  难免孤独
    2021-01-25 12:26

    Yes you can use the jQuery.ajax() call. Like this: Change the text of a element using an AJAX request:

    $("button").click(function(){
        $.ajax({url: "demo_test.txt", success: function(result){
            $("#div1").html(result);
        }});
    });
    

    See this tutorial for more information: http://www.w3schools.com/jquery/ajax_ajax.asp

提交回复
热议问题