【问题标题】:add values taken from query result or from hidden field to asmListItem li asmSelect将查询结果或隐藏字段中的值添加到 asmListItem li asmSelect
【发布时间】:2012-02-23 14:19:44
【问题描述】:

我有一个页面通过它添加优惠,我添加了 asmSelect 以添加此优惠的客户。 没关系

但另一方面,我需要编辑此优惠,因此在编辑页面和 asmListItem 中,我需要将已选择的客户保存在此优惠的数据库中。

如何将值(取自查询结果或隐藏字段)添加到 asmListItem li 这一些代码: $(document).ready(function() {

        $("#customers").asmSelect({
            addItemTarget: 'bottom',
            animate: true,
            highlight: true,
            sortable: true

        }).after($("<a href='#'>Select All</a>").click(function() {
            $("#customers").children().attr("selected", "selected").end().change();
            return false;
        })); 


    }); 

我需要在 .asmListItem 中用隐藏字段中的值填充 li

【问题讨论】:

    标签: php jquery multi-select asmselect


    【解决方案1】:

    不确定这是您问的问题。如果您的问题(以及您使用的标签)不够准确,请显示一些代码。

    $('.asmListItem li').data( $('#yourhiddenfield).val() );
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-25
      相关资源
      最近更新 更多