将弹出框表格的内容通过选项放入到页面表格中该怎么做?
默狼 2016-09-21 11:35:31 <!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script src="js/jquery-1.8.3.min.js"></script>
<style>
.tab1 {
width: 500px;
height: auto;
margin: 10px auto;
border: 1px solid red;
}
.tab2 {
width: 500px;
height: auto;
margin: 10px auto;
}
.sel {
width: auto;
height: auto;
margin: 10px auto;
margin-left: 500px;
}
.pop_back {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background-color: #000000;
z-index: 1;
opacity: .5;
display: none;
}
.pop_cont {
width: 100%;
height: auto;
margin: 10px auto;
z-index: 999;
display: none;
background: #FFF;
position: fixed;
}
</style>
</head>
<body>
<table id='list' border="1" class="tab1">
<thead>
<tr>
<th id="study">学号</th>
<th id="sdy_name">姓名</th>
<th id="sdy_age">年龄</th>
</tr>
</thead>
<tbody>
<tr>
<td>12233</td>
<td>张三</td>
<td>152</td>
</tr>
<tr>
<td>2232</td>
<td>李四</td>
<td>163</td>
</tr>
<tr>
<td>3233</td>
<td>刘王</td>
<td>172</td>
</tr>
<tr>
<td>4344</td>
<td>王闯</td>
<td>182</td>
</tr>
</tbody>
</table>
<div class="sel">
<input type="button" value="导入" id="lead">
</div>
<div class="pop_back"></div>
<div class="pop_cont">
<table id='list2' border="1" class="tab2">
<thead>
<tr>
<th>学号</th>
<th>姓名</th>
<th>年龄</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>张</td>
<td>15</td>
</tr>
<tr>
<td>2</td>
<td>李</td>
<td>16</td>
</tr>
<tr>
<td>3</td>
<td>刘</td>
<td>17</td>
</tr>
<tr>
<td>4</td>
<td>王</td>
<td>18</td>
</tr>
</tbody>
</table>
<div class="sel">
<select>
<option id="study_one" value="1">学号</option>
<option id="study_two" value="2">姓名</option>
<option id="study_age" value="3">年龄</option>
</select>
<input type="button" value="确定" class="sure">
<input type="button" value="取消" class="close">
</div>
</div>
<script>
$(function(){
$("#lead").click(function(){
$(".pop_back").show();
$(".pop_cont").show();
})
$(".close").click(function(){
$(".pop_back").hide();
$(".pop_cont").hide();
})
})
</script>
</body>
</html>
有哪位大神知道这样应该怎么做。在弹出的表格当中用户可以点击选择表格并把相应的内容通过选项放入到页面表格想对应的项(如,当用户点击弹出表格的第一列第一项时可以将用户点击的内容放到页面表格上对应的第一列第一项)