1
00:00:00,000 --> 00:00:00,360

2
00:00:00,360 --> 00:00:03,140
>> DAVID J. Malan: Sasa, kwa kuwa mwisho
mfano, mimi yamejaa yangu JavaScript

3
00:00:03,140 --> 00:00:07,840
code ndani ya HTML yangu, hasa
kuweka kwamba wito wa kunukuu ndani ya

4
00:00:07,840 --> 00:00:10,190
thamani ya juu yangu kuwasilisha sifa.

5
00:00:10,190 --> 00:00:13,820
Hebu safi mambo juu kidogo na sababu
nje yote ya JavaScript kificho katika

6
00:00:13,820 --> 00:00:18,110
tag script katika kurasa yangu kichwa, na badala yake
kutoa hiyo aina tag a

7
00:00:18,110 --> 00:00:21,320
kipekee kitambulisho kupitia
ambayo tunaweza kupata.

8
00:00:21,320 --> 00:00:26,800
>> Hasa, hebu kuchukua nafasi ya hii
sifa hapa na ID ni sawa na quote,

9
00:00:26,800 --> 00:00:29,030
unquote, kusema, quote.

10
00:00:29,030 --> 00:00:33,420
Wakati huo huo, hebu kwenda hadi zilizopo yangu
quote kazi, kukata kwamba kanuni

11
00:00:33,420 --> 00:00:37,860
kabisa, na kuchukua nafasi ya kazi
pamoja na yafuatayo quote yenyewe -

12
00:00:37,860 --> 00:00:42,850
dola ishara, kazi, inayobainisha kwamba
wakati hati ni tayari kutumia

13
00:00:42,850 --> 00:00:48,160
jQuery shorthand nukuu, nataka
kutekeleza code zifuatazo.

14
00:00:48,160 --> 00:00:51,120
Dollar ishara, quote, unquote, quote -

15
00:00:51,120 --> 00:00:52,360
no pun lengo -

16
00:00:52,360 --> 00:00:56,120
hivyo kufafanua kwamba Ningependa
kupata hiki kutoka DOM yangu, ambaye

17
00:00:56,120 --> 00:01:01,340
kitambulisho kipekee ni quote, na kisha ningependa
kama kusajili tukio handler

18
00:01:01,340 --> 00:01:05,459
kwa kuwasilisha fomu kwa dot
kuwasilisha, kupita kwa kuwa mwingine

19
00:01:05,459 --> 00:01:09,750
kazi bila majina kwamba wakati huu mapenzi
kuchukua hoja moja, tukio hilo.

20
00:01:09,750 --> 00:01:13,390
Na kisha, ndani ya kazi hii mimi nina
kwenda kuweka kwamba kanuni kutoka kabla ya

21
00:01:13,390 --> 00:01:17,840
lakini bayana kwamba Ningependa kuzuia
tabia default ya kwamba

22
00:01:17,840 --> 00:01:21,390
tukio kuwasilisha ili fomu yenyewe
si in halisi ya

23
00:01:21,390 --> 00:01:22,450
kijijini server.

24
00:01:22,450 --> 00:01:24,725
>> Hebu sasa ila faili hili na
kufungua it up katika browser yangu.

25
00:01:24,725 --> 00:01:27,630

26
00:01:27,630 --> 00:01:34,720
http://localhost/ajax.html.

27
00:01:34,720 --> 00:01:35,760
Kuna aina hiyo.

28
00:01:35,760 --> 00:01:39,590
Hebu aina katika ishara kama FB
kwa kuungana na kupata quote.

29
00:01:39,590 --> 00:01:41,530
Na kuna Picha ya
bei ya hisa za karibuni.

30
00:01:41,530 --> 00:01:44,363