2013-01-17 3 views
0

클릭 할 때 페이지를 새로 고치기 위해 '새로 고침'버튼을 누르기 만하면됩니다. 아래 코드는 그렇게 할 수 없습니다. 왜 그런지 모르겠다. 어떤 도움이라도 대단히 감사하겠습니다.jQuery Mobile 내에서 버튼을 새로 고침하는 방법

<!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>&copy; 2013 | EHU</h1> 
    </div> 

답변

관련 문제