I currently have a table that has a list of email template names being echoed using php. Below is part of the php code. I\'m trying to grab the table value and pass it to
You id attribute would be the same for every td inside the loop. So JS would not know which element you want.
You could try passing this
into the onclick
method
HTML
JS
function moveValue( elem )
{
alert(elem.innerHtml);
}
I would take a look at jQuery
if I were you. It makes all this stuff much easier to achieve.
- 热议问题