LoRa Packet Forwarder 单选按钮修改
This commit is contained in:
parent
c53d3348af
commit
ad41584915
@ -303,6 +303,22 @@
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
$(document).ready(function (){
|
||||
var readyRadioValue = $('input[name=mqttKeep][checked]').val();
|
||||
console.log(readyRadioValue)
|
||||
checkRadio(readyRadioValue);
|
||||
$('.mqttKeep').on('ifChecked', function(event){
|
||||
var radio = $(event.target).val();
|
||||
checkRadio(radio);
|
||||
})
|
||||
})
|
||||
function checkRadio(value){
|
||||
if (value === '1'){
|
||||
document.getElementById('mqttHeartbeat').style.display = 'block';
|
||||
}else {
|
||||
document.getElementById('mqttHeartbeat').style.display = 'none';
|
||||
}
|
||||
}
|
||||
var prefix = ctx + "lora/agreement";
|
||||
$("#form").validate({
|
||||
focusCleanup: true
|
||||
@ -346,9 +362,6 @@
|
||||
$.operate.save(prefix + "/edit", form);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
// DOM完全加载和解析完成后执行的代码
|
||||
cleanDiv()
|
||||
@ -367,4 +380,5 @@
|
||||
document.getElementById('agreement4').style.display = 'none';
|
||||
document.getElementById('agreement5').style.display = 'none';
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
</body>
|
Loading…
Reference in New Issue
Block a user