Sign in to follow this  
Followers 0
antidot

Read valu from input field inside <td>

2 posts in this topic

Hi,

 

i'm struggeling a bit while i'm trying to acces the value of inputfields inside tablecells.

I don't have ids available and hve to check row by row or jus specified rows.

function test(){
	var tableBody = document.getElementById("testCalc");
	var tableBodyRows = tableBody.rows.length;
	console.log(tableBody);
	console.log(tableBody.rows[0].cells[4].?);
}

.value

.innerHTML.value

.textContent

 

all won't work.

 

Any suggestions?

Share this post


Link to post
Share on other sites

Hmmm. Sometimes stepping away helps...

Just tried the .children[0].value . Works fine!

 

i guess getElementsByTagName would work as well ...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0