小编Imr*_*rik的帖子

如何在选中的表格中设置复选框?

我有一张表id,我想将其设置为选中的复选框,但我不能这样做,我不知道为什么。

我尝试这样做,但没有任何反应,而且我没有任何错误消息:

$('#medicalListTable input.type_checkbox[id="sindicate-345"]').prop('checked', true);
$('input.type_checkbox[id="sindicate-345"]').prop('checked', true);
$('input.type_checkbox[id="sindicate-345"]').attr('checked', true);
Run Code Online (Sandbox Code Playgroud)
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<table id="medicalListTable" class="display responsive nowrap dataTable no-footer" cellspacing="0" width="100%" role="grid" aria-describedby="medicalListTable_info" style="width: 100%;">
  <thead>
    <tr role="row">
      <th class="sorting ui-state-default sorting_asc" tabindex="0" aria-controls="medicalListTable" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Id empleado: activate to sort column descending" style="width: 134px;">
        <div class="DataTables_sort_wrapper">Id empleado<span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-n"></span></div>
      </th>
      <th class="sorting ui-state-default" tabindex="0" aria-controls="medicalListTable" rowspan="1" colspan="1" aria-label="Nombre: activate to sort column ascending" style="width: 174px;">
        <div class="DataTables_sort_wrapper">Nombre<span class="DataTables_sort_icon css_right ui-icon ui-icon-caret-2-n-s"></span></div>
      </th>
      <th class="sorting ui-state-default" …
Run Code Online (Sandbox Code Playgroud)

html javascript checkbox jquery html-table

6
推荐指数
1
解决办法
169
查看次数

如何选择“我的文档”路径来保存文件

我想这样做:

JFileChooser fileChooser = new JFileChooser();
fileChooser.setCurrentDirectory(new File(System.getProperty(**MY DOCUMENTS PATH **)));
Run Code Online (Sandbox Code Playgroud)

我想要做的就是放置“我的文档”路径,它会在不同的 Windows 版本中发生变化,但我不知道该怎么做。

我不能使用“文字路径”我需要一个相对路径,因为这个应用程序将适用于所有 Windows 版本,我不能使用文字路径。

java jfilechooser file path save

1
推荐指数
1
解决办法
2431
查看次数

标签 统计

checkbox ×1

file ×1

html ×1

html-table ×1

java ×1

javascript ×1

jfilechooser ×1

jquery ×1

path ×1

save ×1