2
jQuery mobile第一次看的書提到數據佔位符,但我認爲它不工作。我有:數據佔位符
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="Phillip Senn">
<title>jQuery Mobile Matrix</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.js"></script>
</head>
<body>
<h1>slider</h1>
<div data-role="fieldcontain">
<label for="mySelect">Choose One:</label>
<select id="mySelect">
<option value="1">One</option>
<option value="2" data-placeholder="true">Two</option>
<option value="3">Three</option>
</select>
</div>
</body>
</html>
而'Two'不是默認選項。我不應該使用選定的屬性嗎?
呵呵。我幾乎在那裏,除了你沒有在你的例子中包含數據佔位符。這本書也沒有,所以也許......我不知道。 –
更新了我的答案。 –
我試圖讓這個工作,並有相當多的使用相同的代碼,但我得到的佔位符選項出現只是另一種選擇。我使用jQuery Mobile 1.0.a4.1與PhoneGap 1.0.0結合使用,如果這有所幫助的話。有使用這兩種技術的經驗嗎?謝謝。 – fynnbob