How to Pass the innerHTML of a <td> to a function?

229
November 26, 2016, at 7:16 PM

I have the following HTML

problems:

  • the table is generated and i can not pass a ID or class.
  • the number is random and i do not know it until the table is generated.

How can i pass the value of the random number (12 in this case ) to the function?

Answer 1

If i understood your constraints right, then following may help you

<script> console.cog($("td:nth-child(2)").html()) </script>
Rent Charter Buses Company
READ ALSO
List of key value pairs to array of arrays

List of key value pairs to array of arrays

have something like the following:

371
Uncaught SyntaxError: Unexpected end of input in parseJSON method javascript

Uncaught SyntaxError: Unexpected end of input in parseJSON method javascript

In a webpage that uses javascript, I pass data to a hidden input field using

935
Cannot use &#39;in&#39; operator to search for &#39;length&#39;

Cannot use 'in' operator to search for 'length'

My Website receives the following string from my WCF Service:

479
Show a form at on click and show it with value of a input box

Show a form at on click and show it with value of a input box

I want to show the value of a form on clicking of a checkbox and after selecting a checkbox I want that one of our input box of my form which is disabled show the name of checkbox in that fieldI also want to get the id of that checkbox

250