0
我發送的請求與angular.js
與$http
並得到了一些響應,之後我必須更新頁面,並呼籲timer
功能:執行窗後函數替換
$http({method: 'POST', url: url_api, data: {login_username: username, login_password: password}}).success(function(data, status, headers, config) {
// parse data
....
window.location.replace("/");
// call timer
timer();
}
其中timer
:
function timer(){
document.getElementById("span_count_down").innerHTML = 'Time is out!';
return;
}
但是,當我更新頁面,我沒有看到Time is out!
在innerHTML
,我看到以前的innerHTML
。
謝謝。