html - JavaScript: How to check if second column of a table contains certain text -


I want to use javascript to loop through an HTML table to see if a cell in the second column In "code> order no " (this can not be displayed only once or in specific columns).

I tried the following but it does not work. Can anyone tell me what I am doing wrong here or do I know another way for this? Search for

my JS:

  $ (objIE ("# trans_log_table '). (" Td: eq (1): "(+ "++" '' ') ". Length  

Many thanks in advance, Tim

After thinking a bit about your case, the problem is probably in the jQuery selector, because you all apply in your table and then: eq (1), you probably only Take the first row in the second column before applying the filter.

Try typing as

  $ ("# trans_log_table tr"; td: eq (1): includes ('"+ orderNum +"' ') ")  < / Pre> 

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -