从javascript获取输入数组值

I have a table that gets the users input in a form of an array. I am trying to check to see if the values exist. The problem I run into is the name of the input is name="detail[]" When I try to use document.add_quote_form.detail.value == '' I get detail is undefined. I have the table below.

<form id="add_quote_form" name="add_quote_form" class="form-horizontal">
<table style="width: 90%" id="myTable" class="centered-table table table-bordered">
 <thead>
  <tr>
    <th>Item</th>
  </tr>
 </thead>
  <tbody>
   <tr>
     <td style="width: 60%"><input type="text" id="detail[]" name="detail[]"/></td>
    </tr>
  </tbody>
  </table>
</form>

Not certain what purpose of [] is at id of element? You can use document.querySelector(), attribute begins with selector

document.querySelector("[id^=detail]").value = "";

First Use Class Not Id here if you have alot of td tag with same input name

  <form id="add_quote_form" name="add_quote_form" class="form-horizontal">
    <table style="width: 90%" id="myTable" class="centered-table table table-bordered">
     <thead>
      <tr>
        <th>Item</th>
      </tr>
     </thead>
      <tbody>
       <tr>
         <td style="width: 60%"><input type="text" id="detail[]" name="detail[]"/></td>
        </tr>
      </tbody>
      </table>
    </form>

    <script>
     var details = document.getElementsByClassName('detail'),
     details_values = [].map.call(details , function( row ) {
        // you can do what ever you need here if you need to check each value 
       return row.value;
    });

alert(details_values);

    </script>

however if you using javascript to validate input it should only for interface using because it not secure to rely on javascript 100% , you should also make a server side validation