I am trying to dynamically change the actual HTML value attribute of an input using jQuery. Although using input.attr(\'value\', \'myNewVal\'); wor
value
input.attr(\'value\', \'myNewVal\');
It won't change the value in the DOM explorer of most development tools. But JavaScript will still get the current values. So
var newValue = 'new'; $(sel).val(newValue); newValue == $(sel).val(); // true