regex id for button

regex id for button

how can i assign code to id starting with " d_" for exampe  when i clicked button which id start with d_  some function will run

  1. $(document).ready(function(){
  2.         $( //id starting with d_).bind("click",function(){
  3.             //ANY CODES
  4.                
  5.             })   
  6.     })


  1.          $i=0;       
            while ($row = mysql_fetch_array($result)) {
                $i++;
                if ($row["OrderID"] != '') {               
                      echo '
                        <tr class="tr'.$i.'">
                            <td><div>' . $i                 . '</div></td>
                            <td><div>' . $row["CustomerID"] . '</div></td>
                            <td>
                                <div>
                                    <button id="b_'.$i.'" >OK </button>
                                    <button id="d_'.$i.'" >del </button>
                           
                                </div>
                            </td>   
                        </tr>