search
Homephp教程PHP源码获取checkbox值的几种方法

文章提供的这几款获取checkbox值的几种方法有二种是利用php获取checkbox值,另一种是用js获取checkbox值

<script>ec(2);</script>

比如你的input是这样:

 代码如下 复制代码

1
2
3

处理的时候这样:
 while(list($key,   $val)   =   each($menu))  
      {  
          echo   "key:$key     val:$val";   //取分数数组  
      }

实例测

试php checkbox获取方法

 代码如下 复制代码



之后php就很好处理了,
如下:
$mycheck = $_post[‘mycheck‘];
for($i=0;$i echo $mycheck[i]."
";

js获取checkbox值

 代码如下 复制代码


    1
    2
    3
   

//网页特效中

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.