-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnewjavascript.js
More file actions
executable file
·29 lines (26 loc) · 1.11 KB
/
Copy pathnewjavascript.js
File metadata and controls
executable file
·29 lines (26 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
function clickme(){
$('table').hide();
}
function showme(){
$('table').show();
}
function getTitle(title){
var t = title;
//alert("title= " + t);
$('#film').text(t);
var film;
$('#table1 tr td').each(function(index, tr) {
if ( $(tr).text() == t ) {
//find index of tr
var rowIndex = $(this).closest('tr').index();
alert("Film = " + t + " year = " + $('#table1 tr:nth-child('+ rowIndex + ') td:nth-child(2)').text());
$('#resultTbl').append('<table><td>Title</td><tr>'+ t +'</tr> </table> ');
var tblstr = "<table border='1'><tr><td>This is a test</td><td>Col2</td></tr></table>";
}
})
}