Jquery mobile 数据占位符

Jquery mobile 数据占位符,jquery-mobile,Jquery Mobile,jquerymobilefirstlook手册的第146页提到了数据占位符,但我认为它不起作用。我有: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="author" content="Phillip Senn"> <title>jQuery Mobile Matrix</title> <meta name="viewport

jquerymobilefirstlook手册的第146页提到了数据占位符,但我认为它不起作用。我有:

<!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>

jQuery移动矩阵
滑块
选择一个:
一个
两个
三

“两个”不是默认选项。我不应该改为使用所选属性吗?

当列表中有一个“选择一个”类型的项目,而您不想在本机选择器中显示该项目时,占位符将显示为本机小部件的标题。例如:


选择一个:
一个
两个

如果您希望预先选择一个,那么是的,您应该使用
selected
属性。

Huh。我就快到了,只是示例中没有包含数据占位符。这本书也没有,所以可能…我不知道。我正在尝试让它工作,并且几乎使用了相同的代码,但是我得到的占位符选项只是另一个选项。我将jquerymobile1.0.a4.1与phonegap1.0.0结合使用,如果这有区别的话。你有使用这两种技术的经验吗?谢谢
<select>
  <option value="" data-placeholder="true">Choose one:</option>
  <option value="1">One</option>
  <option value="2">Two</option>
</select>