분류 jquerymobile

자바스크립트를 이용한 버튼 추가

컨텐츠 정보

  • 조회 872 (작성일 )

본문

<!DOCTYPE html>

<html>

<head>

<script type='text/javascript'

  src='http://code.jquery.com/jquery-1.9.1.js'></script>

<script type="text/javascript"

  src="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.js"></script>

<link rel="stylesheet" type="text/css"

  href="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.css">

<script type='text/javascript'>

$(window).load(function(){

   $("#one")

      .append('<a href="" data-role="button" data-theme="c" data-inline="true" id="logoutButton">OK</a>')

      .find("#logoutButton")

      .buttonMarkup("refresh");

});

</script>

</head>

<body>

  <div data-role="page" id="one"></div>

</body>

</html>