当我有 HTML 输入字段并通过直接输入更改它们时,它们实际上应该更改值属性。但是当我尝试获取整个 HTML 记录时,它只会显示旧的值属性。不知何故,这对我来说很清楚,因为 HTML 没有被覆盖,但我需要包含更改的输入值的 HTML。我该如何接近它?
例子:
$('input').addEvent('blur', function(){
alert($('adiv').get('html'));
});
<div id="adiv">Enter something in input box and press tab<div>....<input id="input" type="text" value="1">the mootools will grep the old value of 1 again....</div></div>
始终提醒:
> Enter something in input box and press tab<div>....<input id="input"
> type="text" value="1">the mootools will grep the old value of 1
> again....</div>
但我需要得到的是:
> Enter something in input box and press tab<div>....<input id="input"
> type="text" value="[VALUE FROM USER]">the mootools will grep the old
> value of 1 again....</div>