fix: クリアボタンで検索項目がうまくクリアされない不具合を修正

This commit is contained in:
shimoda.m@nds-tyo.co.jp 2023-10-06 15:01:26 +09:00
parent 5ab6852227
commit 5601846706

View File

@ -113,7 +113,7 @@
<label for="ikoFlg">2017年11月以前のデータを含める</label>
</td>
<td>
<input class="buttonSize" id="clear" type="button" name="clear_bt" value="クリア" onclick="clr()">
<input class="buttonSize" id="clear" type="button" name="clear_bt" value="クリア" onclick="clearForm()">
<input class="buttonSize" id="search_bt" value="検索" type="button" onclick="searchBioList()">
</td>
</tr>
@ -191,6 +191,24 @@
</form>
<script type="text/javascript">
function clearForm() {
// 検索項目をクリア
clr()
// 非表示項目もクリア
const formElement = document.bioHidden
const formInputElements = Array.from(formElement.elements)
for (const formInput of formInputElements) {
if (formInput.name.startsWith('ctrl_')) {
formInput.value = "";
}
if (formInput.type === 'checkbox') {
formInput.checked = false;
}
}
}
// CSV/Excelダウンロード処理
function download(ext) {
// ローディング開始