小编Shi*_*har的帖子

如何在多个选择选项中获取选择的选项数据属性

用户选择多个值。我如何获得每个选定的数据属性值。

HTML代码是

<select id="EMaddMoreEmployee" name="EMaddMoreEmployee[]" multiple="" tabindex="-1" class="select2-hidden-accessible" aria-hidden="true">
  <option value="3" data-available_text="Prashant Kumar is unable to work today.">Prashant Kumar</option>
  <option value="4" selected="" data-available_text="Anand Kumar has not given availability for this day.">Anand Kumar</option>
  <option value="7" data-available_text="Manoj Kumar has not given availability for this day.">Manoj Kumar</option>
  <option value="8" data-available_text="Delip Kumar is available to work all day.">Delip Kumar</option>
  <option value="9" data-available_text="Purendar Kumar has not given availability for this day.">Purendar Kumar</option>
  <option value="10" data-available_text="Subhas Kumar has not given availability for this day.">Subhas Kumar</option>
  <option …
Run Code Online (Sandbox Code Playgroud)

jquery

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

标签 统计

jquery ×1