springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-19 13:02:06
14
我根据一个有用的答案更新了这个问题,这使我更加接近,但遗憾的是没有完全达到我需要的目的。
更新:
我正在尝试创建一个jQuery函数,该函数将禁用任何与当前选中的复选框值的任何部分匹配的复选框。
单击以“Külsó+Belsó+Wax+Motormosás”为值的复选框,将返回以下数组:
$(document).ready(function() {
$('input[id^="takaritas"]').click(function() {
if ($("#kategoria").val() == "") {
$('input[id^="takaritas"]').prop("checked", false);
$('input[id^="takaritas"]').val("");
alert("Válasszon autó kategóriát!");
} else if ($("#takaritasnincs").is(":checked")) {
$('input[id^="takaritas"]').not(this).attr("disabled", "disabled");
$('input[id^="takaritas"]').not(this).prop("checked", false);
$('input[id^="takaritaskoltseg"]').val("");
} else if ($(this).not("#takaritasnincs").is(":checked")) {
let array = $(this).val().split(" ");
array.forEach((el, index) => {
array[index] = array[index].replace("mosás", "").replace("Polír", "");
});
const filteredArray = array.filter((x) => x !== "+");
filteredArray.forEach((el) => {
let input = document.querySelector('[value="' + el + '"]');
if (input) {
document.querySelector(
'input[type="checkbox"][value="' + el + '"]'
).disabled = true;
document.querySelector(
'input[type="checkbox"][value="' + el + '"]'
).checked = false;
}
});
} else {
$('input[id^="takaritas"]').removeAttr("disabled");
}
});
});
我需要这个函数来禁用包含数组任何部分的复选框,忽略加号和部分字符串“mosás”和“polír”。
不胜感激。
顺晟科技:
如果存在该数组,则可以禁用该数组:
更新后编辑: 您需要使用带有通配符的querySelectorAll来匹配所有值中的一个数组元素,然后foreach并禁用它。
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11