$() hauv JavaScript yog dab tsi?
$() hauv JavaScript yog dab tsi?

Video: $() hauv JavaScript yog dab tsi?

Video: $() hauv JavaScript yog dab tsi?
Video: Av Luaj Quas - Macy Hawj (Official Lyrics/Audio Video) 2024, Kaum ib hlis
Anonim

Developer(s): Prototype Core Team

Ua li no, $() txhais li cas hauv JavaScript?

Keeb Kwm teb: Dab tsi yog qhov lub ntsiab lus ntawm "$" kos npe rau hauv JavaScript ? jQuery yog a Javascript lub tsev qiv ntawv uas tau hu los ntawm kev ua haujlwm jQuery(); Thaum koj hu rau jQuery() nrog tus xaiv lub jQuery muaj nuj nqi khiav thiab xa rov qab ib yam khoom jQuery. $() tsuas yog ib qho luv luv rau jQuery() - lawv tuaj yeem siv sib hloov.

Ib yam li ntawd, dab tsi yog siv rau hauv JavaScript? Muab tej yam yooj yim, JavaScript yog ib hom lus hais lus orient programming tsim los ua kom txhim kho lub vev xaib yooj yim dua thiab ntxim nyiam dua. Feem ntau, JavaScript yog siv los tsim cov lus teb, sib tham sib ntsiab rau cov nplooj ntawv web, txhim kho cov neeg siv kev paub.

Kuj kom paub, $() hauv jQuery yog dab tsi?

Qhov txawv tab sis muaj tseeb, koj tuaj yeem siv "$" ua lub npe ua haujlwm hauv JavaScript. Nws yog shorthand rau jQuery (). $ yog zoo nkauj feem ntau siv los ua tus xaiv muaj nuj nqi hauv JS. Hauv jQuery qhov $ muaj nuj nqi ua ntau tshaj li xaiv yam ho. Koj tuaj yeem hla nws tus neeg xaiv kom tau txais cov khoom sib txuam los ntawm DOM.

Dab tsi yog === operator?

1) Thaum peb sib piv ob qhov sib txawv ntawm ntau hom xws li. ib tug boolean nrog ib tug hlua los yog ib tug xov tooj nrog String siv == tus neeg ua haujlwm , nws cia li hloov ib hom mus rau lwm qhov thiab rov qab tus nqi raws li cov ntsiab lus sib npaug, thaum === operator yog nruj sib npaug tus neeg ua haujlwm hauv Java, thiab tsuas yog rov qab muaj tseeb yog tias ob qho tib si sib txawv ntawm tib yam

Pom zoo: