jQuery mobile 学习06 提示框和确认框

这篇博客介绍了如何在jQuery Mobile应用中实现提示框和确认框的功能。通过示例代码展示了如何触发对话框显示,并提供了对话框的标题、内容和按钮配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html> 
<html>
<head>
	<title>JQM TITLE</title>
	
	<meta name="viewport" content="width=device-width, initial-scale=1">
	
	<link rel="stylesheet" href="jqm/jquery.mobile-1.4.5.css" />
	<script src="jqm/jquery-1.11.2.js"></script>
	<script src="jqm/jquery.mobile-1.4.5.js"></script>

</head>
<body>

	<div data-role="page" id="index">
		<div data-role="header">
			<h1>页面标题区域</h1>
		</div>
		<div data-role="main" class="ui-content">
			<p>页面内容区域</p>
			<br/>
			<a href="#showdialog">显示提示框</a>
			<br/>
			<br/>
			<br/>
			<a href="#showconfirm">显示确认框</a>
			<br/>
			<br/>
		</div>
		<div data-role="footer" data->
			<h2>页面底部区域</h2>
		</div>
	</div>
	<div data-role="dialog" id="showdialog">
		<div data-role="header">
			<h1>提示框的标题</h1>
		</div>
		<div data-role="content">
			<p>jack</p>
			<p>daju</p>
		</div>
		<div data-role="footer">
			<h3>提示框的底部</h3>
		</div>
	</div>
	
	<div data-role="dialog" id="showconfirm">
		<div data-role="header">
			<h1>确认框标题</h1>
		</div>
		<div data-role="content">
			<p>
				<b>你确定退票吗?</b>
			</p>
			<a data-role="button" data-inline="true">确定</a>
			<a data-role="button" data-inline="true">取消</a>
		</div>
		<div data-role="footer">
			<h3>确认框的底部</h3>
		</div>
	</div>
	
	
	
</body>
</html>

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值