Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> co robi ten kod...
qbas-s
post
Post #1





Grupa: Zarejestrowani
Postów: 304
Pomógł: 1
Dołączył: 28.06.2009

Ostrzeżenie: (0%)
-----


Może ktoś mi wytłumaczyć po kolei co robie ten kod:


{
$.ajax({
type: "POST",
url: "index.php",
data: "email="+$('#email').val(),
success: function(data) {
$('#a_email').html(data);
}
});
}
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 5)
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




http://api.jquery.com/jQuery.ajax/

wysyła ajaxem wartosc pola EMAIL a odpowiedź serwera zapisuje do pola A_EMAIL
Go to the top of the page
+Quote Post
qbas-s
post
Post #3





Grupa: Zarejestrowani
Postów: 304
Pomógł: 1
Dołączył: 28.06.2009

Ostrzeżenie: (0%)
-----


a co robi funkcja val() i html() ?
Go to the top of the page
+Quote Post
Wicepsik
post
Post #4





Grupa: Zarejestrowani
Postów: 1 575
Pomógł: 299
Dołączył: 26.03.2009

Ostrzeżenie: (20%)
X----


SPRAWDŹ NA STRONIE JQUERY!
Go to the top of the page
+Quote Post
cojack
post
Post #5





Grupa: Zarejestrowani
Postów: 898
Pomógł: 80
Dołączył: 31.05.2008

Ostrzeżenie: (20%)
X----


.val() to nic innego pewnie jak value obiektu, a html to pewnie nic innego jak innerHTML
Go to the top of the page
+Quote Post
erix
post
Post #6





Grupa: Moderatorzy
Postów: 15 467
Pomógł: 1451
Dołączył: 25.04.2005
Skąd: Szczebrzeszyn/Rzeszów




Jasne, nabijać posty, będzie tego.
Go to the top of the page
+Quote Post

Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.09.2025 - 20:24