Html、AngularJs、Javascrpitを使用して1つのテーブル行を別のテーブルに移動できるかどうかは疑問でした。ここでHtml、AngularJS、Javascriptで行を別のテーブルに移動する
は一例です:私がしなければならないタスクを持つテーブルがある-I
。
私は「行うには」表の行の上でご確認-ifそれから除去され、画像のように「完了TABL」に配置する必要があります。
<!DOCTYPE html>
<html lang="en">
<head>
<title>TASKS</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div>
<h3>To do</h3>
<table class="table table-striped table-hover col-sm-4">
<thead>
<tr>
<th>Task</th>
<th>Time</th>
<th>Done</th>
</tr>
</thead>
<tbody>
<tr>
<th>Task_One</th>
<th>5 min</th>
<th><input type="checkbox" unchecked></th>
</tr>
<tr>
<th>Task_Two</th>
<th>2 min</th>
<th><input type="checkbox" unchecked></th>
</tr>
<tr>
<th>Task_Three</th>
<th>2 min</th>
<th><input type="checkbox" unchecked></th>
</tr>
</tbody>
</table>
<h3>Done</h3>
<table class="table table-striped table-hover col-sm-4">
<thead>
<tr>
<th>Task</th>
<th>Time</th>
<th>Done</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</body>
</html>
私はいくつかの例を確認しているが、それらのほとんどはjQueryのを使用して、同じテーブル内の行を移動についてだけですが、私はJavascriptを使用してそれをしなければなりません。
あなたがドラッグ&DRAPの機能をしたいですかhttp://stackoverflow.com/a/32703215/709439 – MarcoS
を参照してください? TODO listのチェックボックスをオンにしたときにDoneのリストに表示したいのですか? – TechnoCrat
アイデアは:「TODO」テーブルからタスクをチェックすると「Done」テーブルに配置され、「Done」テーブルからタスクを選択解除すると、「TODO」テーブルに再び配置されます。 –