The correct way to work with HTML5 checkbox

HTMLJavascriptProgramming Scripts

The following is the correct way −

<input name = "your_name" value = "your_value" type = "checkbox">

Example

Here is an example −

<!DOCTYPE html>
<html>
   <head>
      <title>Checkbox Control</title>
   </head>
   <body>
      <form>
         <input type = "checkbox" name = "maths" value = "on"> Maths
         <input type = "checkbox" name = "physics" value = "on"> Physics
      </form>
   </body>  
</html>
raja
Published on 21-Mar-2018 14:22:29
Advertisements