Bootstrap-模态框Modal使用
传值使用JavaScript方式吧,代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" media="all" href="/assets/css/bootstrap.css">
<link rel="stylesheet" media="all" href="/assets/css/bootstrap-responsive.css">
</head>
<body>
<TABLE>
<tr>
<td class="center">张三</td>
<td class="center">// ::</td>
<td class="center">呵呵呵呵呵呵</td>
<td class="center">
<a class="btn btn-info" href="javascript:void(0)" onclick="dodel(1)">
删除
</a>
</td>
</tr>
<tr>
<td class="center">李四</td>
<td class="center">// ::</td>
<td class="center">哈哈哈哈哈</td>
<td class="center">
<a class="btn btn-info" href="javascript:void(0)" onclick="dodel(2)">
删除
</a>
</td>
</tr>
</TABLE>
<div class="modal hide" id="Del">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>删除确认</h3>
</div>
<div class="modal-body">
<p>您确认要删除此条吗?...</p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">取消</a>
<a href="Del.asp?id=XXX" class="btn btn-primary">确认删除</a>
</div>
</div>
</body>
</html>
<script src="/assets/js/jquery.js"></script>
<script src="/assets/lib/bootstrap.min.js"></script>
<script type="text/javascript">
function dodel(id){
$('.modal').modal('show').on('shown',function(){
$(".btn-primary").attr('href','Del.asp?id='+id);
})
}
</script>
Bootstrap-模态框Modal使用的更多相关文章
- bootstrap模态框modal使用remote第二次加载显示相同内容解决办法
bootstrap模态框modal使用remote动态加载内容,第二次加载显示相同内容解决办法 bootstrap的modal中,使用remote可以动态加载页面到modal-body中,并弹窗显示 ...
- 禁用 Bootstrap 模态框(Modal) 点击空白时自动关闭
在做项目的时候,来了这么一个需求,要求打开模态框后,点击空白的地方不让他自动关闭,只能点击关闭按钮才能关闭. 有了需求,就开始查找资料寻求解决的方法. 我找到的解决方法如下: $('#registCo ...
- Bootstrap模态框modal的高度和宽度设置
(1)高度 将style=“height:900px”放在<div class = "modal-dialog">或者更外层上,整个模态框的高度不会发生变化 如下图所示 ...
- Bootstrap模态框(modal)垂直居中
http://v3.bootcss.com/ 自己也试了改了几种方式也不容乐观,发现在窗口弹出之前是获取不到$(this).height()的值,本想着是用($(window).height()-$( ...
- Bootstrap 模态框(Modal)插件
页面效果: html+js: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> ...
- bootstrap模态框modal使用remote动态加载内容,第二次加载显示相同内容解决办法
bootstrap的modal中,使用remote可以动态加载页面到modal-body中,并弹窗显示 如果提供的是 URL,将利用 jQuery 的 load 方法从此 URL 地址加载要展示的内容 ...
- Bootstrap模态框(MVC)
BZ这篇博客主要是为大家介绍一下MVC如何弹出模态框.本文如果有什么不对的地方,希望大神们多多指教,也希望和我一样的小菜多多学习.BZ在这里谢过各位. 首先要在页面加上一个点击事件: @Html.Ac ...
- Bootstrap3模态框Modal垂直居中样式
1,Bootstrap 模态框插件Bootbox垂直居中样式: <!DOCTYPE html> <html lang="en"> <head> ...
- js控制Bootstrap 模态框(Modal)插件
js控制Bootstrap 模态框(Modal)插件 http://www.cnblogs.com/zzjeny/p/5564400.html
- Bootstrap 模态框(Modal)插件
原文链接:http://www.runoob.com/bootstrap/bootstrap-modal-plugin.html Bootstrap 模态框(Modal)插件 模态框(Modal)是覆 ...
随机推荐
- Mvc学习笔记(4)
上文我介绍了如何将控制器里的值传递给视图,但是是如何传递的呢?原理是什么? 视图 page.cshtml在编译的时候也会编译成一个类,然而这个类会继承于WebViewPage<object> ...
- 使用ajax和history.pushState无刷新改变页面URL onpopstate(转)
Javascript代码 var htmlData1 = $.ajax( { url: "/getXXXResponse", async: false }).re ...
- WebComponent
WebComponent 前言 最近加入到新项目组负责前端技术预研和选型,一直偏向于以Polymer为代表的WebComponent技术线,于是查阅各类资料想说服老大向这方面靠,最后得到的结果是:& ...
- 如何解决jquery版本冲突
<!-- 引入1.6.4版的jq --> <script src="<a href="http://ajax.googleapis.com/ajax/lib ...
- draw9patch超详细教程
这篇文章是android开发人员的必备知识,内容摘选自网络,友我为大家整理和总结,不求完美,但是有用. 视频教程地址:http://player.youku.com/player.php/sid/XM ...
- Android ListView内容变化后的动态刷新
ListView内容变化后的动态刷新 基本知识点: 1.更新适配器Adapter数据源 2.调用适配器Adapter的刷新方法notifyDataSetChanged() 首先需要定义ListView ...
- ajax 初始化请求前携带参数
$(function () { function SetAjax(wxOpenId, departCode) { $.ajaxSetup({ xhrF ...
- android左右晃动动画(红包左右晃动)
TranslateAnimation animation = new TranslateAnimation(0, -5, 0, 0); animation.setInterpolator(new Ov ...
- ASOP源码下载
vmware11下对虚拟机ubuntu14.10系统所在分区sda1进行磁盘扩容完后,重启在引导界面出现“a start job is running for dev-disk-by…”错误,产生此错 ...
- HTTP Authorization
谨以此文献给那些需要实现HTTP AUTH的“程序猿”们. 关于HTTP AUTH的文档不多. RFC在 http://www.ietf.org/rfc/rfc2617.txt wiki在 http: ...