Unable to Disabled button , Input and Select control's on button click for html table

Unable to Disabled button , Input and Select control's on button click for html table

Dear All,

I had written the below code where I required to disable the input , select and button controls and change the background color on click the submit button.

But  I am finding no luck to move further.Can any one please let me what's going wrong in my below function.

  1. <head>
  2.     <style>
  3.         #customers {
  4.             font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  5.             border-collapse: collapse;
  6.             width: 100%;
  7.         }

  8.             #customers td, #customers th {
  9.                 border: 1px solid #ddd;
  10.                 padding: 8px;
  11.             }

  12.             #customers tr:nth-child(even) {
  13.                 background-color: #f2f2f2;
  14.             }

  15.             #customers tr:hover {
  16.                 background-color: #ddd;
  17.             }

  18.             #customers th {
  19.                 padding-top: 12px;
  20.                 padding-bottom: 12px;
  21.                 text-align: left;
  22.                 background-color: #4CAF50;
  23.                 color: white;
  24.             }
  25.     </style>
  26. </head>
  27. <body>

  28.     <table id="customers">
  29.         <tr>
  30.          <th>Edit</th>
  31.             <th>Company</th>
  32.             <th>Contact</th>
  33.             <th>Country</th>
  34.             <td>Participants</td>
  35.             <td>Gender</td>
  36.             <td>Submit </td>
  37.         </tr>

  38.         <tr>
  39.              <td><input type="button" value="Edit" class="use-address"  ></td>

  40.             <td>Alfreds Futterkiste</td>
  41.             <td>Maria Anders</td>
  42.             <td>Germany</td>
  43.             <td><input type="text" id="'+" txtparticipants"+'"></td>
  44.             <td><select>
  45.                                     <option value="select">select</option>

  46.   <option value="volvo">Volvo</option>
  47.   <option value="saab">Saab</option>
  48.   <option value="mercedes">Mercedes</option>
  49.   <option value="audi">Audi</option>
  50. </select></td>
  51.             <td><input type="button" value="Submit" class="use-address" onclick="submitvallues(this)"></td>

  52.         </tr>
  53.  
  54.     </table>
  55.     <script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.js"></script>
  56.     <script type="text/javascript">
  57.      function submitvallues(button){
  58. var row=$(button).closest('tr'),
  59.    select=row.find("select"),
  60.     input=row.find("td:eq(4) input");
  61.  alert( select.val() + "  " + input.val() )
  62.       var data = $(row).children('td').eq(1).text();
  63.       alert(data);
  64.      row.disabled=true;
  65.      row.background-color: coral;
  66.  
  67.  return false  
  68. }
  69.     </script>
  70. </body>


Srk