selected network

This commit is contained in:
Justin 2023-07-19 17:21:07 +08:00 committed by GitHub
parent 8002659f41
commit 22dca4fe66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3303,3 +3303,17 @@ selectMenu.addEventListener("change", function() {
pElement.textContent = selectedValue + " Settings - Changes detected."; pElement.textContent = selectedValue + " Settings - Changes detected.";
pElement2.innerHTML = selectedValue + " Settings -" + "<br>" + " Saved!"; pElement2.innerHTML = selectedValue + " Settings -" + "<br>" + " Saved!";
}); });
// load selected network item into ssid input
function sendNetworkToSSID(element) {
var networksList = document.getElementById('networks-list');
var lis = networksList.querySelectorAll("li");
var ssid_input = document.getElementById('wifi-ssid-input');
var value = element.innerText;
lis.forEach(function(li) {
li.classList.remove("active");
});
ssid_input.value = value;
element.classList.add("active");
}