从表格传输数据 [英] Transfer data from table
本文介绍了从表格传输数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一张HTML表格。
I have a table in HTML.
<tr class="top">
<td class="name1"><a href="#">JOHN DOE</a></td>
<td class="company1">DOE TRUCKING</td>
<td class="position1">TRUCKER</td>
<td class="mc1">1234-567-8901</td>
<td class="dot1">1234-567-8901</td>
<td class="status1"><img src="images/cross.png" width="12" height="12" alt="cross"></td>
</tr>
当我在表格中选择名称时,它会打开一个弹出窗口。
When I select the name in the table it opens up a popup.
<div class="popup1">
<div class="cross3"><a href="#"><img src="images/closr-arrow.png" width="19" height="19" alt="closr-arrow"></a></div>
<h3>TABLE NAME</h3>
<a href="#" class="approve">APPROVE ACCOUNT</a>
<a href="#" class="deny">DENY ACCOUNT</a>
</div>
我如何做到这一点,H3保留了我的表中的名字?
How do I make it so H3 retains the name that was in my table?
Popup显示如下:
Popup is being shown like so:
$(document).ready(function(){
$('.name1 a').click(function(e) {
$('.popup1').lightbox_me({
});
推荐答案
以下是 jsfiddle 我不知道你如何处理你的弹出窗口,但这是你的js应该如何构造的。
Here is the jsfiddle I don't know how you handle your popup but this is how your js should be structured.
$(function(){
$('a').click(function(){
$('h3').html($(this).html())
});
});
这篇关于从表格传输数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文