【问题标题】:How to refresh the contents without reloading page?如何在不重新加载页面的情况下刷新内容?
【发布时间】:2013-01-30 12:28:25
【问题描述】:

我必须刷新页面内容而不用 javascript 重新加载页面。 这不起作用。

window.location.assign("#/invoice/" + $scope.invoiceId);

【问题讨论】:

标签: javascript angularjs


【解决方案1】:

使用 AJAX。 jQuery 提供了一个很好的包装器。

http://jQuery.com/

此示例将 ajax/test.html 加载到您的 #content div 中:

$.get('ajax/test.html', function(data) {
     $("#content").html(data);
});

【讨论】:

    猜你喜欢
    • 2018-10-12
    • 1970-01-01
    • 1970-01-01
    • 2013-08-20
    • 2011-10-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多