怎样使用bootstrap模态框传id窗口传递id值

在 SegmentFault,解决技术问题
每个月,我们帮助 1000 万的开发者解决各种各样的技术问题。并助力他们在技术能力、职业生涯、影响力上获得提升。
一线的工程师、著名开源项目的作者们,都在这里:
获取验证码
已有账号?
问题对人有帮助,内容完整,我也想知道答案
问题没有实际价值,缺少关键内容,没有改进余地
如下图所示,点击编辑弹出模态框,如何向模态框传入当前产品的id值?
答案对人有帮助,有参考价值
答案没帮助,是错误的答案,答非所问
1.將id值隱藏到&tr&標籤,可以聲明個屬性如&tr attr-id="1"&&/tr&或者直接隱藏起點擊方法裡如&input type="button" onclick=“getedit(1);”&2.在點擊使用獲取id值,通過ajax獲取到相應數據。這裡要保存好,當前編輯內容id值3.確認時候,將表單內容和id一塊提交到後台中
分享到微博?
关闭理由:
删除理由:
忽略理由:
推广(招聘、广告、SEO 等)方面的内容
与已有问题重复(请编辑该提问指向已有相同问题)
答非所问,不符合答题要求
宜作评论而非答案
带有人身攻击、辱骂、仇恨等违反条款的内容
无法获得确切结果的问题
非开发直接相关的问题
非技术提问的讨论型问题
其他原因(请补充说明)
我要该,理由是:如何得到指定ID模态对话框的窗口句柄_百度知道
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。
如何得到指定ID模态对话框的窗口句柄
想向模态对话框中发送消息,可是得不到此模态对话框的句柄,造成模态对话框接收不到发送过来的消息?(Findwindow不行(HWND)(GetMainWnd()-&GetSafeHwnd())也不行,)如何解决……………
我有更好的答案
对话框自身拥有一个m_hwnd成员变量,保存了与之相关的句柄。直接调用此成员即可。
::SendMessage((::AfxGetMainWnd()-&m_hWnd),WM_DISPLAY,nTmpt,NULL);还是不行啊
采纳率:23%
来自团队:
模态对话框有自己有消息循环,一旦对话框出现,就会阻塞到对话框的消息循环中。你的目标“想向模态对话框中发送消息”好象无法实现。除非自己给自己发。你可以换非模态对话框。
为您推荐:
其他类似问题
窗口句柄的相关知识
等待您来回答bootstrap怎么才能在点击链接时把那条记录的ID传给modal模态框?
请问怎么才能在点击LINK时把那条记录的ID传给模态框呢?链接&a&href=&javascript:void(0);&&class=&jq_link&&rel=&&?php&echo&$val['id'];?&&&link&/a&模态框&div&class=&modal&fade&&id=&Modal&&tabindex=&-1&&role=&dialog&&aria-labelledby=&myModalLabel&&aria-hidden=&true&&
&&&div&class=&modal-dialog&&
&&&&&div&class=&modal-content&&
&&&&&&&div&class=&modal-header&&
&&&&&&&&&button&type=&button&&class=&close&&data-dismiss=&modal&&aria-hidden=&true&&&&/button&
&&&&&&&&&h4&class=&modal-title&&id=&myModalLabel&jq_message&&TITLE&/h4&
&&&&&&&/div&
&&&&&&&div&class=&modal-body&&
&&&&&&&&&form&method=&post&&action=&index.php&id=???这里需要传值&&class=&form-horizontal&&role=&form&&
&&&&&&&&&div&class=&form-group&&
&&&&&&&&&&&label&for=&inputname&&class=&col-sm-2&control-label&&NAME&/label&
&&&&&&&&&&&div&class=&col-sm-8&&&input&type=&text&&name=&name&&id=&inputname&&value=&&&class=&form-control&&&/div&
&&&&&&&&&/div&
&&&&&&&&&div&class=&form-group&&
&&&&&&&&&&&label&for=&inputtel&&class=&col-sm-2&control-label&&TEL&/label&
&&&&&&&&&&&div&class=&col-sm-8&&&input&type=&text&&name=&tel&&id=&inputtel&&value=&&&class=&form-control&&&/div&
&&&&&&&&&/div&&&&&&&&&&
&&&&&&&/div&
&&&&&&&div&class=&modal-footer&&
&&&&&&&&&button&type=&submit&&class=&btn&btn-primary&&SUBMIT&/button&
&&&&&&&/div&
&&&&&&&/form&
&&&&&/div&
&/div&JS&script&
$(document).ready(function()&{
&&$(&.jq_link&).click(function()&{
&&&&var&id&=&$(this).attr('rel');
&&&&$(&#Modal&).modal();
解决方法 1:
$(document).ready(function()&{
&&$(&.jq_link&).click(function()&{
&&&&var&id&=&$(this).attr('rel');
&&&&$(&#Modal&.modal-body&&&form&).attr(&action&,&&index.php?id=&&+&id);
&&&&$(&#Modal&).modal();模态窗口及open的使用及相关经验 - CSDN博客
模态窗口及open的使用及相关经验
最近做的项目,两个弹出窗口的方式都接触到了,总结一下使用的经验。
1.什么是模态窗口:
模态窗口就是只有你当前弹出的对话框为有效,其他父窗体之类都无效,像你有时候鼠标点上去都没有反应。感觉用在强迫用户在子窗口完成一个操作时候,使用模态窗口比较合适。例如,我在做审批拒绝时候,需要用户输入审核内容,弹出一个模态窗口,强制用户输入内容以后,才可以返回父窗口进行其他操作。
window.showModalDialog使用手册
基本介绍:
showModalDialog()&(IE&4+&支持)
showModelessDialog()&(IE&5+&支持)
window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框。
window.showModelessDialog()方法用来创建一个显示HTML内容的非模态对话框。
使用方法:
vReturnValue&=&window.showModalDialog(sURL&[,&vArguments]&[,sFeatures])
vReturnValue&=&window.showModelessDialog(sURL&[,&vArguments]&[,sFeatures])
参数说明:
必选参数,类型:字符串。用来指定对话框要显示的文档的URL。
vArguments--
可选参数,类型:变体。用来向对话框传递参数。传递的参数类型不限,包括数组等。对话框通过window.dialogArguments来取得传递进来的参数。
sFeatures--
可选参数,类型:字符串。用来描述对话框的外观等信息,可以使用以下的一个或几个,用分号“;”隔开。
1.dialogHeight&:对话框高度,不小于100px,IE4中dialogHeight&和&dialogWidth&默认的单位是em,而IE5中是px,为方便其见,在定义modal方式的对话框时,用px做单位。
2.dialogWidth:&对话框宽度。
3.dialogLeft:&离屏幕左的距离。
4.dialogTop:&离屏幕上的距离。
5.center:&{yes&|&no&|&1&|&0&}:窗口是否居中,默认yes,但仍可以指定高度和宽度。
6.help:&{yes&|&no&|&1&|&0&}:是否显示帮助按钮,默认yes。
7.resizable:&{yes&|&no&|&1&|&0&}&[IE5+]:是否可被改变大小。默认no。
8.status:&{yes&|&no&|&1&|&0&}&[IE5+]:是否显示状态栏。默认为yes[&Modeless]或no[Modal]。
9.scroll:{&yes&|&no&|&1&|&0&|&on&|&off&}:指明对话框是否显示滚动条。默认为yes。
下面几个属性是用在HTA中的,在一般的网页中一般不使用。
10.dialogHide:{&yes&|&no&|&1&|&0&|&on&|&off&}:在打印或者打印预览时对话框是否隐藏。默认为no。
11.edge:{&sunken&|&raised&}:指明对话框的边框样式。默认为raised。
12.unadorned:{&yes&|&no&|&1&|&0&|&on&|&off&}:默认为no。
2.open方法弹出的窗口:
和模态窗口相反,可以在子窗口弹出的同时,操作父窗口。
window.open&('page.html','newwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,&resizable=no,location=no,&status=no')&
//写成一行&
脚本运行后,page.html将在新窗体newwindow中打开,宽为100,高为400,距屏顶0象素,屏左0象素,无工具条,无菜单条,无滚动条,不可调整大小,无地址栏,无状态栏。
上例中涉及的为常用的几个参数,除此以外还有很多其他参数,请见四。
四、各项参数
其中yes/no也可使用1/0;pixel&value为具体的数值,单位象素。
参数&|&取值范围&|&说明&
alwaysLowered&|&yes/no&|&指定窗口隐藏在所有窗口之后&
alwaysRaised&|&yes/no&|&指定窗口悬浮在所有窗口之上&
depended&|&yes/no&|&是否和父窗口同时关闭&
directories&|&yes/no&|&Nav2和3的目录栏是否可见&
height&|&pixel&value&|&窗口高度&
hotkeys&|&yes/no&|&在没菜单栏的窗口中设安全退出热键&
innerHeight&|&pixel&value&|&窗口中文档的像素高度&
innerWidth&|&pixel&value&|&窗口中文档的像素宽度&
location&|&yes/no&|&位置栏是否可见&
menubar&|&yes/no&|&菜单栏是否可见&
outerHeight&|&pixel&value&|&设定窗口(包括装饰边框)的像素高度&
outerWidth&|&pixel&value&|&设定窗口(包括装饰边框)的像素宽度&
resizable&|&yes/no&|&窗口大小是否可调整&
screenX&|&pixel&value&|&窗口距屏幕左边界的像素长度&
screenY&|&pixel&value&|&窗口距屏幕上边界的像素长度&
scrollbars&|&yes/no&|&窗口是否可有滚动栏&
titlebar&|&yes/no&|&窗口题目栏是否可见&
toolbar&|&yes/no&|&窗口工具栏是否可见&
Width&|&pixel&value&|&窗口的像素宽度&
z-look&|&yes/no&|&窗口被激活后是否浮在其它窗口之上
3.两种方式的传值:
(1)模态窗口:
returnValue是javascript中html的window对象的属性,目的是返回窗口值,当用window.showModalDialog函数打开一个IE的模式窗口(模式窗口就是子窗口,打开后不能操作父窗口,只能等模式窗口关闭时才能操作)时,用于返回窗口的值,下面举个例子:
------------------------------------------------------------------------------
//father.html
&META NAME=&GENERATOR& Content=&Microsoft Visual Studio 6.0&&
&TITLE&&/TITLE&
&script language=&javascript&&
function showmodal(){
var ret = window.showModalDialog(&child.html&,null,&dialogWidth:350dialogHeight:350help:status:no&);
if (ret){alert('子窗口返回真!');
alert('子窗口返回假!');
&INPUT id=button1 type=button value=Button name=button1 onclick=&showmodal();&&
&/HTML&------------------------------------------------------------------------------
//child.html
&META NAME=&GENERATOR& Content=&Microsoft Visual Studio 6.0&&
&TITLE&&/TITLE&
&script language=&javascript&&
function trans(tag){
if (tag==0){
window.returnValue=
window.returnValue =
window.close();
&INPUT id=button1 type=button value=&返回真& name=button1 onclick=&trans(1)&&
&INPUT id=button2 type=button value=&返回假& name=button2 onclick=&trans(0)&&
这样一来可以实现从模式窗口向父窗口传递值的作用,
这个returnValue除了可以是布尔值,整型值等以外还可以是个js数组,用来传递大量数据。
showModalDialog,是模态窗口,始终获得焦点,但弹出的窗体不能刷新,此弹出的窗口里操作button,要想不弹出新窗口,需在
弹出的窗口中在&head&和&/head&之间加&base target=&_self&&。
(2)open的窗口:
可以通过window.opener,获得父窗口对象,一般通过dom操作进行传值(我是这样做的,比如可以在父窗口放个hidden的控件,通过dom来进行操作),通过一个简单的例子,DOM进行操作,以下例子,实现功能是子窗口有一排复选框,当选中复选框,父窗口中的表格就会自动添加一行,当取消复选框时候,父窗口中的相应表格行就会删除掉。
父窗口的JS代码:按钮触发该方法
function getProblemWindow(){
window.open(&getProblemWindow.action&,&请选择添加的问题&,&location=no,width=950,height=350,&
+&toolbar=no,scrollbars=yes,menubar=no,screenX=100,screenY=100&);
子窗口的HTML代码:
&%@ page language=&java& contentType=&text/ charset=utf-8&%&
&%@ include file=&/WEB-INF/include/taglib.jsp&%&
&!DOCTYPE html PUBLIC &-//W3C//DTD XHTML 1.0 Transitional//EN& &http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&&
&html xmlns=&http://www.w3.org/1999/xhtml&&
&%@ include file=&/WEB-INF/include/head.jsp&%&
var arrProblemId = new Array();//数组中存放为选中的problem的Id
var arrCount = new Array();//用于设置获取父窗口中,第几道题,当作一个栈使用
var parentWindow = window.opener.
//var countProblem = parentWindow.getElementById(&countProblem&).getAttribute(&value&);//获取父窗口的一个hidden,其记录题目数量信息
//var count=parseInt(countProblem);//统计题目数量
function query(){
document.forms(0).action=&getProblemWindow.action&;
document.forms(0).submit();
function update(id){
window.location.href=&view.action?path=edit&entity.id=&+
function deleted(id){
window.location.href=&view.action?path=delete&entity.id=&+
function view(id){
window.location.href=&view.action?path=view&entity.id=&+
function census(problemId,checkbox){
var form1 = parentWindow.getElementById(&form1&);
var table1 = parentWindow.getElementById(&paper1&);
//判断,选中的单选框将其ID加入数组,被取消点击的删除数组中的内容
if(checkbox.checked==true){
//count++;
arrProblemId.push(problemId);
arrCount.push(count);
if(arrCount.length&=2){
arrCount.reverse();
var newTr=parentWindow.createElement(&tr&);
var newTd=parentWindow.createElement(&td&);
var newTd2=parentWindow.createElement(&td&);
var newBtn=parentWindow.createElement(&input&);
newBtn.setAttribute(&type&,&button&);
newBtn.setAttribute(&value&,&删除该题&);
newBtn.setAttribute(&name&,&deleteBtn&+problemId);
newBtn.setAttribute(&onclick&,&deleteProblem2(\&&+problemId+&\&,this);&);
//父窗口创建一个hidden
var id = parentWindow.createElement(&input&);
id.setAttribute(&type&,&hidden&);
id.setAttribute(&value&,problemId);
id.setAttribute(&name&,&problemIds&);//名称相同,返回给struts2自动封装相应名称的List对象
//newTd.innerHTML=&第&+arrCount.pop()+&题&;
//arrCount.length=0;
//获取题目名称
var content = checkbox.getAttribute(&content&);
//设置tr的id
newTr.setAttribute(&id&,&tr&+problemId);
newTr.setAttribute(&name&,&tr&+problemId);
//newTd.innerHTML=problemId;
newTd.appendChild(id);
newTd.appendChild(newBtn);
newTd2.innerHTML=
newTr.appendChild(newTd);
newTr.appendChild(newTd2);
table1.appendChild(newTr);
//count--;
for(var i=0;i&arrProblemId.i++){
if(arrProblemId[i]==problemId){
arrProblemId.splice(i,1);
location =//获得位置下标
//arrCount.push(location+1);//将被删除的计数题号入栈
//寻找id为problemId的tr,并删除
var newTr = parentWindow.getElementById(&tr&+problemId);
table1.removeChild(newTr);
&body onunload=&destroy();&&
&form name=&from1& method=&post& action=&list.action& &
&table width=&90%& cellpadding=&0& cellspacing=&0&&
&td&创建&/td&
&fieldset&
&legend&查询条件&/legend&
&table width=&100%&&
&th&名称&/th&
&s:textfield name=&problem.content&/&
&th&问题类型&/th&
&s:select list=&#{'-1':'全部','0':'单选题','1':'多选题','2':'判断题','3':'简答题'}& name=&problem.type&&&/s:select&
&th&时间&/th&
&input type=&text& size=&22& name=&problem.q_beginTime&
onfocus=&WdatePicker({readOnly:true})&
class=&Wdate& value=&&s:date name=&problem.q_beginTime& format=&yyyy-MM-dd&/&& /&
&input type=&text& size=&22& name=&problem.q_endTime&
onfocus=&WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})&
class=&Wdate& value=&&s:date name=&problem.q_endTime& format=&yyyy-MM-dd HH:mm:ss&/&& /&
&th&创建人&/th&
&s:textfield name=&problem.createUser&/&
&th&问题状态&/th&
&s:select list=&#{'-1':'全部','0':'未使用','1':'已使用'}& name=&problem.state&&&/s:select&
&/fieldset&
&td align=&right&&
&input type=&button& name=&button1& value=&查询& onclick=&query();&/&
&table cellpadding=&0& cellspacing=&0& border=&1& width=&100%& &
&th width=&5%&&选择&/th&
&th width=&5%&&序号&/th&
&th width=&50%&&问题名称&/th&
&th width=&10%&&题型&/th&
&th width=&10%&&问题状态&/th&
&th width=&10%&&创建人&/th&
&th width=&10%&&创建时间&/th&
&s:iterator value=&pageData.list& var=&problem& status=&tableId&&
&s:checkbox name=&problemIds& onclick=&census(\&%{#problem.id}\&,this);& content=&%{#problem.content}&
&s:property value=&#tableId.index+1&/&
&s:property value=&#problem.content& /&
&s:if test=&#problem.type==0&&单选题&/s:if&
&s:if test=&#problem.type==1&&多选题&/s:if&
&s:if test=&#problem.type==2&&判断题&/s:if&
&s:if test=&#problem.type==3&&简答题&/s:if&
&s:if test=&#problem.state==0&&未使用&/s:if&
&s:if test=&#problem.state==1&&已使用&/s:if&
&s:property value=&#problem.createUser& /&
&s:date name=&#problem.createTm& format=&yyyy-MM-dd HH:mm:ss&/&
&/s:iterator&
&capinfo:page action=&getProblemWindow.action& width=&800& pageData=&${pageData}& /&
关于dom操作,我是参考写的。
以上两种对子窗口进行控制的方式介绍到这里。
本文已收录于以下专栏:
相关文章推荐
web前端之锋利的jQuery九:jQuery插件的使用(模态窗口、cookie、UI)1.模态窗口插件-SimpleModal:SimpleModal是一个轻量级的jQuery插件,它为模态窗口的开...
在Ionic中,模态窗口通过$ionicModal提供。他易于使用且非常强大,详细信息请参考$ionicModal文档。Ionic中的模态窗口可以使用模板字符串或URL创建。本文将使用URL。
基本介绍:
          showModalDialog()         (IE 4+ 支持)
 &#16...
所谓模态窗口(modal window),又叫做模式窗口,一般是指应用程序中那些任务比较紧要的窗口。只要它们存在,它们便会阻止用户访问其他窗口(或者是阻止用户访问其祖先窗口)。在windows中,使用...
在自动化测试过程中发现点击某个按钮后弹出了一个特别的窗口。
特点一,该窗口不关闭就无法切换到其他窗口。
特点二,该窗口无法使用开发人员工具进行探测。
这个特别的窗口就是模态窗口:
 对话...
乙醇大师,由于在某公司有网络限制,自己总结的资料全部取不出来。关于WebDriver定位模态窗口的问题,在这简单写一下我的心得吧。
首先说定位常规窗口,官网给出了一个方法:
for (String ...
经常有页面列出一个数据列表,点击添加、修改的时候呢,就弹出一个窗口,在弹出的窗口里进行数据管理,然后呢,返回,返回后,原来的窗口里的数据列表要重新刷新
这里说的就是这个东西
要解决的问题三个:
他的最新文章
讲师:宋宝华
讲师:何宇健
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)bootstrap 模态框 传值
我的图书馆
bootstrap 模态框 传值
bootstrap 模态框 传值
&div class="d_table" id="d_table"&
&table class="table table-hover table-striped table-bordered"&
&th&姓名&/th&
&th&性别&/th&
&th&手机号码&/th&
&th&邮箱&/th&
&th&操作&/th&
&tbody id="tbody"&
&c:forEach items="${personList.datas}" var="person"&
&td&${person.personName}&/td&
&td&${person.personSex}&/td&
&td&${person.personPhone}&/td&
&td&${person.personMail}&/td&
&td&&a data-target="#update" data-toggle="modal" &修改&/a& | &a href="javascript:del('${person.id}')"&删除&/a&&/td&
&/c:forEach&
&/div&&div class="modal fade" id="update" aria-hidden="true"& &div class="modal-dialog"&
&div class="modal-content"&
&form id="saveDeviceForm" action="saveDevice" method="post"&
&div class="modal-header"&
&button type="button" class="close" data-dismiss="modal"&×&/button&
&h3&修改&/h3&
&div class="modal-body"&
&li&&span&姓名:&/span&&input id="name" type="text" name="personName"/&&/li&
&li&&span&性别:&/span&
&input id="p_man" type="radio" name="personSex" value="男"/&&label for="p_man"&男&/label&
&input id="p_woman" type="radio" name="personSex" value="女"/&&label for="p_woman"&女&/label&
&li&&span&手机号码:&/span&&input id="phone" type="text" maxlength="11" name="personPhone"/&&span class="errorMeg" id="errorPhone"&&/span&&/li&
&li&&span&邮箱:&/span&&input type="text" name="personMail" id="email" onblur="checkEmail()"/&&span class="errorMeg" id="errorEmail"&&/span&&/li&
&li&&span&地址:&/span&&input type="text" name="personAddress" /&&/li&
&div class="modal-footer"&
&a class="button" data-dismiss="modal" aria-hidden="true"&取消&/a&
&a class="button" onclick="submitOK()"&确定&/a&
点击删除 如何将所对应的数据传到id="update"的模态框中
爱尚简单 修改于 4个月前
----------共有2条评论------------
你用的bootstrap版本是2还是3? (4个月前 by 黑桃K)
@黑桃K版本3 (4个月前 by 爱尚简单)
&!DOCTYPE html&&html&
&meta charset="utf-8"&&!-- 最新 Bootstrap 核心 CSS 文件 --&&link rel="stylesheet" href="/twitter-bootstrap/3.0.3/css/bootstrap.min.css"&&!-- 可选的Bootstrap主题文件(一般不用引入) --&&link rel="stylesheet" href="/twitter-bootstrap/3.0.3/css/bootstrap-theme.min.css"& &/head&
&body&&div class="d_table" id="d_table"&
&table class="table table-hover table-striped table-bordered"&
&th&姓名&/th&
&th&性别&/th&
&th&手机号码&/th&
&th&邮箱&/th&
&th&操作&/th&
&tbody id="tbody"&
&c:forEach items="${personList.datas}" var="person"&
&tr id="aa"&
&td&${person.personName}&/td&
&td&${person.personSex}&/td&
&td&${person.personPhone}&/td&
&td&${person.personMail}&/td&
&td&&a href="javascript:void(0)" onclick="update(this);" &修改&/a& | &a href="javascript:del('${person.id}')"&删除&/a&&/td&
&/c:forEach&
&/div&&div class="modal fade" id="update" aria-hidden="true"& &div class="modal-dialog"&
&div class="modal-content"&
&form id="saveDeviceForm" action="saveDevice" method="post"&
&div class="modal-header"&
&button type="button" class="close" data-dismiss="modal"&×&/button&
&h3&修改&/h3&
&div class="modal-body"&
&li&&span&姓名:&/span&&input id="name" type="text" name="personName"/&&/li&
&li&&span&性别:&/span&
&input id="p_man" type="radio" name="personSex" value="男"/&&label for="p_man"&男&/label&
&input id="p_woman" type="radio" name="personSex" value="女"/&&label for="p_woman"&女&/label&
&li&&span&手机号码:&/span&&input id="phone" type="text" maxlength="11" name="personPhone"/&&span class="errorMeg" id="errorPhone"&&/span&&/li&
&li&&span&邮箱:&/span&&input type="text" name="personMail" id="email" onblur="checkEmail()"/&&span class="errorMeg" id="errorEmail"&&/span&&/li&
&li&&span&地址:&/span&&input type="text" name="personAddress" /&&/li&
&div class="modal-footer"&
&a class="button" data-dismiss="modal" aria-hidden="true"&取消&/a&
&a class="button" onclick="submitOK()"&确定&/a&
&/body&&/html&&!-- jQuery文件。务必在bootstrap.min.js 之前引入 --&&script src="/jquery/1.10.2/jquery.min.js"&&/script&&&!-- 最新的 Bootstrap 核心 JavaScript 文件 --&&script src="/twitter-bootstrap/3.0.3/js/bootstrap.min.js"&&/script&&script& function update(obj){
var tds=$(obj).parent().parent().find('td');
$('#name').val(tds.eq(0).text());
$('#update').modal('show'); }&/script&
我只帮你传了姓名的值,其他的依次类推,你可以把代码复制保存成html文件试试效果。
TA的最新馆藏[转]&[转]&[转]&[转]&
喜欢该文的人也喜欢}

我要回帖

更多关于 模态窗体传id 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信