를 DIV 두 개의 인수
mywebsite.com/ajax.php?user=XXX&secondParam=ZZZZ
무관 onClick 이벤트를 취하는 PHP/JSP/.NET 페이지를 만들 jQuery에서이 작업을 수행하십시오.
$("#TheIdOfYourElement")
귀하의 경우 지금
$("#messageMenuUnread")
,이 클릭 된 때를 수신하여, 이제
$("#messageMenuUnread").click(function(){
//DO SOMETHING
}
는 AJAX의 재미. 당신은 더 기술적 인 세부 사항에 대한
http://api.jquery.com/category/ajax/에서 문서를 읽을 수 있지만, 그것은
색상 변화에 관해서는
$("#TheIdOfYourImage").click(function(){
$.ajax({
type: "POST", // If you want to send information to the PHP file your calling, do you want it to be POST or GET. Just get rid of this if your not sending data to the file
url: "some.php", // The location of the PHP file your calling
data: "name=John&location=Boston", // The information your passing in the variable1=value1&variable2=value2 pattern
success: function(result){ alert(result) } // When you get the information, what to do with it. In this case, an alert
});
}
아래로 비등 것입니다, 당신은 .css()
방법
$("#TheIdOfAnotherElement").css("background-color","red")