Home > Backend Development > PHP Tutorial > PHP 获取循环遍历input的值

PHP 获取循环遍历input的值

WBOY
Release: 2016-06-23 13:46:17
Original
1532 people have browsed it


 $val){ ?>
                
                


我遍历出来几行tr,如何获取每个input的值?

有没有大神解答啊


回复讨论(解决方案)

你这个遍历只能出一个tr啊

获取input的值方法很多,前台JS, form的传递到后台都可以获取

获取input的值方法很多,前台JS, form的传递到后台都可以获取



我是前台jquery获取的!

你将name属性加上你的$key不就可以了?

已经搞定!谢谢各位!

        var goods_type="";
        for(var i=0; i             goods_type += $("td .goods_type").eq(i).val()+",";
        }
        goods_type = goods_type.substr(0,goods_type.length-1);//除去最后一个“,”
        alert(goods_type);

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template