첫 번째 테이블 내 코드에 하나 개의 테이블에서 HTML 테이블 행의 콘텐츠를 복사하는 방법 :다른 사용 JQuery와 여기
<table class="table table-condensed table-striped table-hover" id="schedules">
<thead>
<th>Schedule Code</th>
<th>Subject Description</th>
<th>Room</th>
<th>Day</th>
<th>Time</th>
</thead>
<tbody>
<tr>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<button> Copy </button>
</tr>
<tr>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<button> Copy </button>
</tr>
<tr>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<button> Copy </button>
</tr>
<tr>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<td>*content here*</td>
<button> Copy </button>
</tr>
</tbody>
</table>
두 번째 테이블 :
<table class="table table-condensed table-striped table-hover" id="my_schedules">
<thead>
<th>Schedule Code</th>
<th>Subject Description</th>
<th>Room</th>
<th>Day</th>
<th>Time</th>
</thead>
</table>
내 jQuery 코드 :
가첫 번째 테이블의 전체 내용을 두 번째 테이블로 복사합니다. 내가 원하는 것은 복사 버튼을 클릭하면 특정 행만 두 번째 테이블에 복사됩니다.
버튼을 td 태그에 유지하는 것이 가능합니다. 그렇지 않으면 버튼이 몸 안의 표 아래에 표시됩니다. –