jquerymobile-18 Dialog

使用jQueryMobile,只需给链接添加data-rel='dialog'属性即可创建模态对话框。示例代码展示了如何实现简单Dialog,其内部可承载复杂内容,如同独立页面般进行编写。
摘要由CSDN通过智能技术生成

在开发的过程中,我们可能需要使用到模态的对话框,在jquerymobile中这个实现很简单,只需要给一个普通的链接添加data-rel="dialog"这样的属性就可以了。下面给出一个例子代码:

<!DOCTYPE html>
<html>
<head>
<title>Dialog Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>
<div data-role="page" id="first">
	<div data-role="header">
		<h1>Dialog Test</h1>
	</div>
	<div data-role="content">
		<p>
		<a href="#page3" data-rel="dialog
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值