我的代码在webbrowser和iphone上正常工作, 但是页面(#fichier_clients)在Android设备上留空。
非常感谢,
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css">
<link rel="stylesheet" href="css/styles.css">
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.mobile-1.3.1.js"></script>
<script src="js/gmao.js"></script>
.
在同一页面中,div接收结果
<div id="fichier_clients" data-role="page" data-add-back-btn="true">
<div data-role="header" data-position="fixed">
Fichier Clients
</div>
<div data-role="content">
<ul id="employeeList" data-autodividers="true"
data-role="listview"
data-filter="true"></ul>
</div>
</div>
$(document).on('pageshow', '#fichier_clients' ,function(){
alert("fichier clients");
getEmployeeList();
});
function getEmployeeList() {
$.getJSON(serviceURL + 'fichier_clients.php', {database:database}, function(data) {
$('#employeeList li').remove();
clients = data.items;
$.each(clients, function(index, clients) {
$('#employeeList').append('<li>
<a href="accueil_gmao.html? numero_client=' + clients.numero_client
+ '#fiche_client" data-ajax="false">' +
'<h4>' + clients.client + '</h4>' +
'<span class="ui-li-count">' + clients.numero_client + '</span></a></li>');
});
$('#employeeList').listview('refresh');
});
}