我根据http://jquerymobile.com/test/docs/pages/popup/index.html调用 close ,但什么也没发生(显然我希望它在这种情况下根本不会显示):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>popup</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset= ISO-8859-5">
<script>
$(document).ready(function () {
$("#popupBasic").popup();
$("#popupBasic").popup("open");
$("#popupBasic").popup("close");
});
</script>
</head>
<body>
<div data-role="page">
<div data-role="popup" id="popupBasic">
<p>This is a completely basic popup, no options set.</p>
</div>
</div>
</body>
</html>