私のプロジェクトでは、1 ページに「トピック」と呼ばれる jQuery Mobile テキストエリアがあります。
テキストエリアに入力された文字をカウントするために使用しているこのスクリプトがありますが、このスクリプトは最初のキーストロークで結果を返すだけです。もう一方はしません。
$(document).delegate("#topicDialog", "pageinit", function() {
$("#topic").keyup(function(e) {
var tam = $(this).length;
if (tam <= 61700){
$("#maxCarac").html(tam +" typed characters. The maximum allowed is 61700");
} else {
alert("You have reached the maximum text size.\nPlease break your text into more than one topic.");
$("#topic").val($("#topic").substring(61700));
}
});
});
何が起こっている可能性がありますか?