How to replace part of an input value in jquery?
- by WonderBugger
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 like this:
<input type="text" value="20,54,26,99" name="ids" />
I've tried:
$('input[name=ids]').val().replace("54,","");
and
var replit = $('input[name=ids]').val();
replit.replace("54,","");
$('input[name=ids]').val(replit);
but neither worked?