Change function question

Change function question


Hi,
I wanna monitoring if there any text element changed. but the jQuery
change function could fired only when this element gained focus. It
doesnt work if we use .val() to change it, nd here is my example:
<script type='text/javascript'>
    $(document).ready(function(){
        changed = false;
        $("input[@type='text']").change(function(){
            changed = true;
        });
        $("input#fill").click(function(){
            $("input[@type='text']").val(Math.random());
        });
        $("input#send").click(function(){
            alert(changed);
        });
    });
</script>
<input id="fill" type="button" value="ChangeIt"/>
<input id="send" type="button" value="Go"/>
<input type="text"/>
During this, you can only get a false if u just click 'ChangeIt'. So,
is there other way to let me catch that event?
thx,
Daniel