0
在这里看到的jfiddle:https://jsfiddle.net/dirturban/0nq4zLen/1/麻烦全局变量
否则,可能有人告诉我为什么我的var text_length
不工作?下面
代码:
var text_length = $('#textarea').val().length;
var video_length = text_length/920;
var totalPrice = video_length * 2750;
$('#textarea').keyup(function() {
$('#textarea_feedback').html(text_length + ' minutes');
});
$('button').click(function() {
$('#price').text('$' + totalPrice + '.00');
});
试试这个https://jsfiddle.net/0nq4zLen/2/ – Sushil
你没有得到你的KEYUP温控功能里面text_lenght的价值。 –
@ user1661677做了小提琴的帮助? – Sushil