zncstrap/modules/webadmin/files/webadmin.js
2014-02-11 12:44:19 +08:00

14 lines
386 B
JavaScript

function floodprotection_change() {
var protection = document.getElementById('floodprotection_checkbox');
var rate = document.getElementById('floodrate');
var burst = document.getElementById('floodburst');
if (protection.checked) {
rate.removeAttribute('disabled');
burst.removeAttribute('disabled');
} else {
rate.disabled = 'disabled';
burst.disabled = 'disabled';
}
}