Jquery mobile按鈕的三種創建方式及使用條件

1.用於頁面之間的跳轉

<a href="#" data-role="submit" data-inline="true">按鈕顯示的內容</a>

a.其中包含一個data-inline元素,用於自適應其按鈕內容大小或者需要兩個或多個按鈕並排顯示,需要使用時設置爲true,否則將佔據整行

b.使用該方式創建按鈕時,可以使用data-transition元素,例如:

<a href="#pageone" data-role="button" data-inline="true" data-transition="slide">轉到頁面一</a>

c.使用該方式創建按鈕時,可以指定爲垂直方向創建或者水平方向創建多個按鈕,例如:

<div data-role="content">
<div data-role="controlgroup" data-type="horizontal">
<p>水平分組</p>
<a href="#" data-role="button">
one</a>
<a href="#" data-role="button">
two</a>
<a href="#" data-role="button">
three</a>
</div><br/>


<div data-role="controlgroup" data-type="vertical">
<p>垂直分組</p>
<a href="#" data-role="button">one</a>
<a href="#" data-role="button">two</a>
<a href="#" data-role="button">three</a>
</div>
</div>

d.關於button的其他基本屬性(簡單列出幾個)

data-corners:規定按鈕是否有圓角

data-mini:規定是否是小型按鈕

data-shadow:規定按鈕是否有陰影

2.應用於表單的提交

(1)  <button>按鈕顯示內容</button>

(2) <input type="button" value="按鈕顯示內容">

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章