2
4

1 回答 1

4

You need to use the change event.

$(document).ready(function(){
    $('#product').change(function(){
        $('#result').text($(this).val() * 25.99);
    });    
});​

Also, you might want to add a minimum value for your input field:

<input name="shares" id="product" type="number" min=0 />
于 2012-07-31T16:03:45.717 回答