Javascript 当没有从表中选择记录时,如何在按钮上放置模式。我使用的是bootstrap4

Javascript 当没有从表中选择记录时,如何在按钮上放置模式。我使用的是bootstrap4,javascript,python-3.x,html,bootstrap-4,Javascript,Python 3.x,Html,Bootstrap 4,因此,我希望在用户尝试使用“继续”按钮时,以模式或警报的形式显示消息,但未选择表中的任何记录。如果从表中选择了一条记录,用户可以使用该按钮,但在选择一条记录之前,该按钮不应具有任何功能。选择记录后,继续按钮将执行上述javascript。我一直在尝试寻找一个示例,但由于我对javascript和bootstrap不太熟悉,我还没有找到一个适合我的示例。我不知道我是否正确理解了您的要求,但类似的示例可能适合…: <table id="resultTable" class="table tab

因此,我希望在用户尝试使用“继续”按钮时,以模式或警报的形式显示消息,但未选择表中的任何记录。如果从表中选择了一条记录,用户可以使用该按钮,但在选择一条记录之前,该按钮不应具有任何功能。选择记录后,继续按钮将执行上述javascript。我一直在尝试寻找一个示例,但由于我对javascript和bootstrap不太熟悉,我还没有找到一个适合我的示例。

我不知道我是否正确理解了您的要求,但类似的示例可能适合…:

<table id="resultTable" class="table table-hover table-bordered table-sm">
  <thead>
    <tr>
      <th>Select</th>
      <th>Message Id</th>
      <th>Service</th>
      <th>Date</th>
    </tr>
  <thead>
  <tbody>
    <tr>
      <td>
        <div class="radio">
          <input type="radio" name="selectRow"/>
        </div>
      </td>
      <td>SomeId001</td>
      <td>SERVICE1</td>
      <td>2019/02/04</td>
    <tr>
  </tbody>
</table>

<br/>

<button id="proceedBtn" type="button" class="btn btn-light">Proceed</button>

$('#proceedBtn').click(function(){
    $('.nav-tabs > .active').next('li').find('a').trigger('click');
});

我不知道我是否正确理解了您的要求,但类似的东西可能适合…:

<table id="resultTable" class="table table-hover table-bordered table-sm">
  <thead>
    <tr>
      <th>Select</th>
      <th>Message Id</th>
      <th>Service</th>
      <th>Date</th>
    </tr>
  <thead>
  <tbody>
    <tr>
      <td>
        <div class="radio">
          <input type="radio" name="selectRow"/>
        </div>
      </td>
      <td>SomeId001</td>
      <td>SERVICE1</td>
      <td>2019/02/04</td>
    <tr>
  </tbody>
</table>

<br/>

<button id="proceedBtn" type="button" class="btn btn-light">Proceed</button>

$('#proceedBtn').click(function(){
    $('.nav-tabs > .active').next('li').find('a').trigger('click');
});