今天我需要幫助一些jquery,我真的沒有太多的知識。在下面的代碼中,如果我有「variablecommentlimitneedstogeherehere」,我該如何將我已經定義爲commentlimit的變量。我嘗試了很多不同的東西,但都沒有成功。謝謝!幫助jQuery變數
<input type='hidden' id='commentlimit' value='8'/>
<script>
$(window).scroll(function() {
if ($(window).scrollTop() >= $(document).height() - $(window).height()) {
document.getElementById("loadingcomments").style.display = 'block';
var commentlimit = document.getElementById('commentlimit').value;
$('#load').load('getprofilecomments.php?username=<?php echo $profilename; ?>&commentlimit=variablcommentlimitneedstogohere');
//alert('end of page');
}
});
</script>
非常感謝。只要它能讓我接受這個答案! – Eggo 2012-01-30 21:18:05
另外,謝謝你的提示。 – Eggo 2012-01-30 21:19:02