I would like to have checked checkbox in my website, but it dows not work.
The website is generated dynamically by perl, so this is a problem. If I want to display just a template without perl variables (I use {variable} for generating variables in a page), the checkbox is checked!! Does anybody know, how could I fix it?
I have a code like this:
<div class="form-check" style="margin-top:5px;">
<label class="form-check-label" id="disableDHCPe" name="disDHCPe" style="padding-left:0px;">
<input type="checkbox" class="form-check-input" checked> DHCP
</label>
</div>
But if I run the website in browser, checkbox is not checked and code looks like:
<div class="form-check" style="margin-top:5px;">
<label class="form-check-label" id="disableDHCPe" name="disDHCPe" style="padding-left:0px;">
<INPUT type="hidden" name="disDHCPe" id="disDHCPe" value="">
<INPUT type="checkbox" id="disDHCPe_chk" name="disDHCPe_chk" onchange="disDHCPe.value=this.checked?'X':'';"> DHCP</label>
</div>
Aucun commentaire:
Enregistrer un commentaire