Home  >  Article  >  Backend Development  >  如何传递这个动态生成的select值

如何传递这个动态生成的select值

WBOY
WBOYOriginal
2016-06-13 13:48:201073browse

怎么传递这个动态生成的select值?

HTML code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><select name="cpm_id" id="cpm_id" onchange="change_pm({$list.id},)">
        <option value="0">转给</option>
        {foreach item=pm_list  from=$pm_list}
            <option value="{$pm_list.user_id}">{$pm_list.user_name}</option>
        {/foreach}
    </select> 


怎么才能将{$pm_list.user_id}也成为change_pm()的参数?就是和{$list.id}并列成为change_pm()的参数

------解决方案--------------------
{$pm_list.user_id} 这个是很多个的id来的?你要将所有id都放在 change_pm()参数里面?

你要的是不是当前选择了 option 的 value??
------解决方案--------------------

------解决方案--------------------
探讨
HTML code
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