<script>
$j(document).ready(function(){
$j(":text").keyup(function(){
if (isNaN($j(this).val())) {
alert('* Input digits (0 - 9).');
$j(this).val('');
}
var total = 0;
$j(".txt").each( function(){
total += $j(this).val() * 1;
});
$j('#total').val(total);
});
});
</script>
No comments:
Post a Comment