我在爲我的網站創建評分系統時遇到了大問題。 我對PHP沒有問題,但使用Javascpit和jQuery。使用jQuery,PHP和SQL評分系統:將評分值從javascript傳遞到PHP
我的意圖是給予PHP的額定值,並且還給頁面URI中的一些其他變量(如:?pg=try&id=2
)。
這裏我做什麼(和它的工作)UTIL現在:
$(document).ready(function(){
// START the RAtings script
$('.ratingStars').hover(
// Mouse Hover
function() {
$(this).prevAll().andSelf().addClass('overStar');
$(this).nextAll().removeClass('voteStar');
},
// Handle teh mouseout
function() {
$(this).prevAll().andSelf().removeClass('overStar');
set_votes($(this).parent());
}
);
// This make al clicable
$('.ratingStars').bind('click', function() {
////// HERE THE CODE TO PHP
});
});
我還需要知道如何從PHP傳遞變量爲Javascript ...
謝謝意見。
java是不是javascript – RiaD