今天我需要帮助一些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