源代码 :
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>开源教程(ossoft.cn)</title> </head> <body> <form action="demo-form.php" method="get"> <input type="checkbox" name="vehicle[]" value="Bike"> I have a bike<br> <input type="checkbox" name="vehicle[]" value="Car" checked="checked"> I have a car<br> <input type="submit" value="提交"> </form> </body> </html>
运行结果