我正在尝试在单击按钮时刷新网页,并在页面刷新后调用函数。但它的相反并没有发生,即首先调用该函数,然后刷新页面。
这是我尝试过的:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>
function restartall(){
$('#text').append('hello');
}
</script>
<a href="javascript:document.location.reload();">
<button onclick="restartall()">Referash Map</button></a>
<div id="text"></div>
请解决这个问题。