HTML cov ntawv yog cov cuab yeej muaj zog heev rau kev cuam tshuam nrog cov neeg siv, tab sis rau cov laj thawj kev ua haujlwm nws tsis yog ib txwm pom tseeb tias yuav siv lawv li cas rau lawv lub peev xwm. Kev xa cov ntaub ntawv tsuas yog tsis txaus rau qhov no - koj kuj yuav tsum tau ua kom paub tseeb tias cov ntaub ntawv uas cov neeg siv sau rau hauv cov ntaub ntawv yuav raug xa mus rau hauv cov hom ntawv uas yuav tsum tau ua kom tiav thiab qhov no yuav tsis tawg daim ntawv thov uas twb muaj lawm. Nws tseem yog ib qho tseem ceeb los pab cov neeg siv sau cov ntawv kom raug thiab tsis txhob ntxhov siab thaum sim siv cov ntawv thov.
Tag yog siv los tsim ib daim ntawv HTML. Nws tsis tau tsim cov paj, tab sis yog siv los ua niam txiv lub thawv rau cov khoom xws li. Txawm hais tias koj xav ua ib daim ntawv sau npe yooj yim nrog kev them nyiaj tsis tu ncua thiab kev them nyiaj, lossis kev sib tham sib tham hauv web, koj yuav tsum siv HTML cim cim ua haujlwm, qhov tseem ceeb tshaj plaws yog.
Tus qauv li casHTML Forms
HTML cov ntawv tau tsim thiab tsim qauv ua ntej qhov tshwm sim ntawm asynchronous JavaScript thiab cov ntawv thov web nyuaj. Niaj hnub no, cov ntaub ntawv nkag, cov nyees khawm, thiab lwm yam kev sib cuam tshuam cov txheej txheem tau siv, tab sis ntawm qhov tseem ceeb ntawm qhov no yog qhov system raws li HTTP thov thiab cov lus teb paradigm.
Thaum tus neeg siv thauj khoom ib nplooj ntawv, qhov kev thov http raug xa (feem ntau yog hu ua GET thov). Nws raug xa los ntawm koj tus browser mus rau lub server, thiab feem ntau cov neeg rau zaub mov teb nrog nplooj ntawv web uas tus neeg siv tab tom nrhiav. Qhov kev sib tham no yog ib qho ntawm cov ntsiab lus tseem ceeb tshaj plaws hauv Internet. Thiab qhov ntawd piav qhia raws nraim li cas cov ntawv HTML ua haujlwm.
txheej txheem ntawm kev sib pauv cov ntaub ntawv nrog tus server
Txhua, uas suav nrog cov ntsiab lus xws li, nyob hauv thiab muaj lub npe cwj pwm (lub npe), nrog rau nws tus nqi. Tus nqi yog txhais nyob rau hauv ntau txoj kev. Rau cov ntawv nyeem, qhov no yuav yog tus nqi uas tau nkag mus rau hauv daim teb los ntawm tus neeg siv lub xaib. Rau lub xov tooj cua khawm, tus nqi ntawm qhov kev xaiv xaiv. Tus neeg siv tuaj yeem teeb tsa tus nqi, tab sis feem ntau tsis tuaj yeem teeb tsa lub npe tus cwj pwm. Qhov no tsim ib txheej ntawm lub npe / tus nqi khub uas cov txiaj ntsig tau txiav txim los ntawm cov neeg siv nkag.
Qhov sib txawv tseem ceeb ntawm daim ntawv thiab daim ntawv HTML li niaj zaus yog tias, feem ntau, cov ntaub ntawv sau los ntawm daim ntawv xa mus rau lub vev xaib server. Hauv qhov no, koj yuav tsum teeb tsa lub web server kom tau txais thiab ua cov ntaub ntawv. tag action attributeqhia qhov chaw (URL) qhov twg cov ntaub ntawv khaws tseg yuav tsum raug xa mus.
Tus neeg rau zaub mov teb zoo li cas
Thaum daim ntawv xa tuaj, lub npe-tus nqi khub thiab txhua daim teb hauv lub caij muaj nyob hauv HTTP. Kev thov yog ua rau qhov URL teev nyob rau hauv daim ntawv ntawm tus cwj pwm ua. Hom kev thov (GET lossis POST) yuav nyob rau hauv tus cwj pwm tus cwj pwm. Qhov no txhais tau hais tias txhua tus neeg siv cov ntaub ntawv raug xa mus rau lub server sai li sai tau thaum daim ntawv xa tuaj, thiab lub server tuaj yeem ua txhua yam nws xav tau nrog cov ntaub ntawv ntawd. Thaum tus neeg rau zaub mov tau txais daim ntawv xa tuaj, nws kho nws zoo li lwm qhov kev thov HTTP. Tus neeg rau zaub mov ua txhua yam nws xav tau ua nrog cov ntaub ntawv suav nrog thiab teeb tsa cov lus teb rov qab rau browser.
Yog tias koj nco ntsoov tias kev thauj khoom nplooj ntawv yog cov lus teb, koj yuav pom tias tib yam tshwm sim ntawm no. Nyob rau hauv daim ntawv raug tsim nrog lub cim npe, cov lus teb yog nplooj ntawv tshiab thauj khoom los ntawm browser. Feem ntau, nplooj ntawv tshiab hloov cov ntsiab lus tam sim no, tab sis qhov no tuaj yeem hla dhau nrog lub hom phiaj tus cwj pwm. Feem ntau ntawm cov ntawv online ua haujlwm li no, uas yog vim li cas tus neeg siv tau raug xa mus rau nplooj ntawv Ua Tsaug thaum lawv sau daim ntawv sau npe email.
Web apps thiab cov ntawv tsis muaj tag
Cov ntawv thov sib tham hauv web niaj hnub siv JavaScript code los ua asynchronous http thov. Cov no yog hu rau lub server uas tsis ua rau nplooj ntawv rov qab. Lawv tsis cia siab rau lub cim - ib qho HTML ntsiab ua rau hauv tus cwj pwm. Lawv tsis muab tag nrho cov ntaub ntawv rau hauv ib qho tag nrho.neeg siv thiab tsis txhob xa lawv tam sim ntawd. Vim li no, ntau HTML + JS layout designers hauv web applications tsis siv tag rau txhua daim ntawv. Ntau zaus, lawv tsuas yog siv los ua ib lub thawv rau ntau hom kev nkag teb thiab cov khoom. Nyob rau hauv rooj plaub no, cov txheej txheem thiab kev ua yeeb yam siv yuav tsis pom.
Ntau txog cov ntawv
HTML cov ntawv yog ib qho tseem ceeb ntawm tus neeg siv kev cuam tshuam nrog lub vev xaib lossis daim ntawv thov. Lawv tso cai rau cov neeg siv xa cov ntaub ntawv mus rau qhov chaw. Feem ntau, cov ntaub ntawv raug xa mus rau lub vev xaib server, tab sis nplooj ntawv web kuj tuaj yeem cuam tshuam nws los siv ntawm nws tus kheej. Muaj ntau hom kev hais txog cov ntsiab lus - sib txawv ntawm cov nyees khawm, xaiv rau ntau hom, tawm tswv yim mechanisms. Yog li ntawd, nws tuaj yeem nyuaj rau kev txiav txim siab yam txiaj ntsig los muab rau cov cim cim npe. Thaum nws los txog rau kev tsim cov ntawv, koj yuav tsum ua kom lawv ua haujlwm ntawm qhov sib txawv ntawm qhov screen. Nws yog ib qho tseem ceeb kom lawv nkag tau rau cov neeg tsis taus. Qhov no yog vim li cas cov ntawv thiab cov cim cim yog kab tias qhov nyuaj tshaj plaws ntawm HTML.
Dab tsi cov duab muaj
HTML daim ntawv muaj ib lossis ntau lub widget. Lawv tuaj yeem ua ib kab lossis ntau kab ntawv sau, xaiv lub thawv, khawm, lossis xov tooj cua khawm. Lawv feem ntau cuam tshuam nrog tus cwj pwm uas piav qhia txog lawv lub hom phiaj - kev siv tau zoo tuaj yeem qhia meej rau cov neeg siv pom thiab qhov muag tsis pom yuav ua li cas thiaj li nkag mus rau daim ntawv nkag. Yam ntxwvtxuam nrog rau lawv tus cwj pwm rau thiab id, ntsig txog. Lub rau daim ntawv lo yog hais txog tus cwj pwm id ntawm cov khoom siv sib xws, thiab tus nyeem ntawv tshuaj ntsuam, siv nws, yuav nyeem cov ntawv sau hauv nws.
Dhau li ntawm cov qauv tshwj xeeb rau cov cim, nws tseem ceeb kom nco ntsoov tias cov ntawv tsuas yog HTML code xwb. Qhov no txhais tau tias koj tuaj yeem siv tag nrho lub zog ntawm HTML los tsim koj cov ntawv. Ib qho kev xyaum yog siv tag los qhwv cov ntsiab lus tag nrog
. Cov npe HTML kuj tau siv dav; ntau lub thawv ntawv lossis lub xov tooj cua nyees khawm yog siv rau kev teeb tsa. Tom qab tsim cov input teb, nws tseem yuav ntxiv ib lub pob uas siv lub cim npe thiab xyuas qhov tshwm sim. Qhov yooj yim ntawm cov ntawv HTML ua rau lawv ib qho ntawm cov qauv nyuaj tshaj plaws hauv HTML hom. Tab sis nrog cov qauv tsim nyog thaum tsim ib daim ntawv HTML, koj tuaj yeem xyuas kom meej tias nws siv tau thiab siv tau.