jQuery - add text and var to value

前端 未结 4 1690
广开言路
广开言路 2021-01-28 09:39

I want to add normal text and a jQuery value to an input value.

var amount = $(\'option:selected\', this).val();
    $(\'.customfield\').val(\'clicks,

        
4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-28 10:03

    var amount = $('option:selected').val();
        $('.customfield').val('clicks,,' + amount);
    

提交回复
热议问题