分配文本框的值時,我有以下文本框:問題瓦爾
<input type="textbox" name="number-of-standard-investors" class="enquiry" id="nostandinv" />
我試圖在此文本框的值賦給一個變種,像這樣:
$(document).ready(function(){
var number_of_standing_investments = $('#nostandinv').val(text);
$("#nostandinv").keyup(function(){
//console.log(number_of_standing_investments);
alert(number_of_standing_investments);
});
});
然而number_of_standing_investments永遠不會分配價值,任何人都可以提出問題在這裏?
感謝
From:Performance perspective'number_of_standingvestments = this.value;'會更好 – Satpal
@Satpal已更新。 ':)' –