Q:

how to get the value of td in javascript or jquery?

I have a 
<td id="example" value="tedan!"></td>

How do I get the value of the td? There should be no text inside the td that is why i just put the value in the value tag.

A:

TDs don't have a value attribute. Using jQuery, you could access it via $('example').attr('value'), but this is wrong. In HTML5 you could use a data-value attribute which is all legal. 

