In the Web page we have a table link, if we click on that
link all the contents under that link will be sorted
(asscending/Descending). Now i want to check in which order
the list is ? for that i need to get the data in to some var
How can i get that cells data?
Answer / ganesh
To get data from table cells, u shld use innerHTML.
For that u need to give id's for all the TD's in the Table.
Try the below coding:
<script language="javascript">
function getdatas()
{
var data=document.getElementById('data6').innerHTML;
alert(data);
}
</script>
</head>
<body>
<table width="200" border="1">
<tr>
<td id="data1">ganesh</td>
<td id="data2">magesh</td>
<td id="data3">tanveer</td>
</tr>
<tr>
<td id="data4">satya</td>
<td id="data5">siddiq</td>
<td id="data6">bimal</td>
</tr>
<tr>
<td id="data7">jenson</td>
<td id="data8">nasrulla</td>
<td id="data9">dayanand</td>
</tr>
</table>
<input type="button" value="Get" onclick="getdatas()" />
</body>
Is This Answer Correct ? | 1 Yes | 0 No |
How applet differ from Swings in java ?
why do u need an ANT?
If we add regular expressions to a script recorded in QTP, will it effect the performance of the script?
why script is client dependant.
Need a batch file or VB script to delete old (more than 90datys) roaming profiles
I Am Planning to Write ISTQB foundation level Ceritification of inida. can Any Body let me know how to prepare for it & Any Study material can you provide or Any other E-books i should need to Study. Please Mail to me ajaybe_2004@yahoo.co.in THnaks in advance Ajay
what will this do? function show_alert value="Show User" eval("x=10; y=20; document.write(x*y)");
Someone who protect my excel file, m using ms office 2007 and windows 7 operating system, pls help me, how can i unprotect sheet
what is the Structure of an ANT file?
which is best institute for flex and actionscript in hyderabad
please send the scrpit driver program
what is the fullform of URL or URI?