61
rated 0 times
[
68]
[
7]
/ answers: 1 / hits: 16844
/ 10 Years ago, wed, november 19, 2014, 12:00:00
Right now, I have this td:
<td id=setCustomer><?= $customer ?></td>
Later down the page I have:
<script>
document.getElementById('setCustomer').onclick = function(){
var newOne = document.getElementById('setCustomer');
console.log(var newOne is +newOne);
}
</script>
When I click the table cell that contains this customer name, the function launches and spits out:
var newOne is [object HTMLTableCellElement]
instead of:
var newOne is ACME CORP.
what am I doing wrong?
More From » html