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>