jQuery Mobile 按钮

<a>标签使用data-role="button"变为按钮ui-btn-active表示是活动的

<div data-role="page">
  <div data-role="header"><h1>头部栏</h1></div>
  <div class="ui-grid-a">
    <div class="ui-block-a">
      <a href="#" data-role="button" class="ui-btn-active">确定</a>
    </div>
    <div class="ui-block-b">
      <input type="submit" value="取消" />
    </div>
  </div>
  <div data-role="footer"><h4>©2012 rttop.cn studio</h4></div>
 </div>

 使用按钮组controlgroup进行水平和垂直的排列

<div data-role="page">
    <div data-role="header"><h1>头部栏</h1></div>
    <div data-role="controlgroup">
      <a href="#" data-role="button" data-icon="check" class="ui-btn-active">确定</a>
      <a href="#" data-role="button" data-icon="delete">取消</a>
    </div>
    <div data-role="controlgroup" data-type="horizontal">
      <a href="#" data-role="button" data-icon="check" class="ui-btn-active">确定</a>
      <a href="#" data-role="button" data-icon="delete">取消</a>
    </div>
    <div data-role="footer"><h4>©2012 rttop.cn studio</h4></div>
 </div>

相关推荐