更新时间:2023-09-14 12:21:52
$('#foo').val($('#foo').val() + 'something');
(当然,您可以并且应该缓存该元素).
(Of course you can and should cache the element).
另一种方式(非常jQuery风格):
Another way (very jQuery style):
$('#foo').val(function(){
return this.value + "something";
});