<head>
<meta name="format-detection" content="telephone-no">
<link rel="stylesheet" href="css/themes/default/jquery.mobile-1.2.0.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.2.0.js"></script>
</head>
<body>
<div data-role="page" id="main">
<script type = "text/javascript" >
$(document).on('pagebeforeshow', '#main', function() {
$.ajax({
url: "http://localhost/PhpProject1/index.php",
jsonpCallback: 'yes',
contentType: "application/json",
dataType: 'jsonp',
success: function(data) {
console.log(data);
var markup = "";
$.each(data.list, function(i, elem) {
var $template = $('<li> <div class=ui-grid-a > <div class=ui-block-a ><a >' + "yes" + '</a> </div> <div class=ui-block-b data-theme=a> ' + "vkmcmv" + '</div> </div> </li>');
$("#tweet-list").append($template);
});
$("#tweet-list").listview("refresh", true);
},
error: function(request, error) {
alert(error);
}
});
});
</script>
<div data-role="header" class="logo">
<img src="img/lanwa.png" />
<br/>
<h2>Lanwa Sales pad</h2>
</div>
<div data-role="content">
<ul id="tweet-list" data-role="listview" data-inset="true" data-filter="true" >
</ul>
</div>
<div data-role="footer">
</div>
</div>
</body>
我尝试使用上面的代码在列表视图上显示项目,它工作正常。但是尽管我导入了默认样式表,但该设计尚未应用于列表视图。下面的图像将显示最终结果如何