How to replace part of an input value in jQuery?

前端 未结 5 1960
你的背包
你的背包 2021-02-13 19:10

I\'ve been trying to figure out a way to replace part of a string in an input value, but haven\'t been able to get it working.

The input field looks li

5条回答
  •  悲&欢浪女
    2021-02-13 19:31

    $('input[name=ids]').val(function(index, value) {
       return value.replace('54,', '');
    });
    

提交回复
热议问题