我要做的就是让我的“刷新”按钮在点击时简单地刷新页面,但我下面的编码不允许我这样做,我不知道为什么。任何帮助将不胜感激。
<!DOCTYPE HTML>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<link href='style.css' rel='stylesheet'/>
<script>
function swapButton() {
var b = $('#button');
b.text('Done');
b.buttonMarkup({ icon: "check" });
b.button('refresh');
}
</script>
</head>
<body>
<div data-role="header" data-posiition="fixed" id="header" data-theme="a">
<a data-icon="refresh" data-iconpos="right" data-theme="c" id="button" onclick="swapButton()">Refresh</a>
<h1>© 2013 | EHU</h1>
</div>