Txhawm rau kom ua tiav ib tsab ntawv ua haujlwm, nws xav tau hu ua (qhib haujlwm) hauv qee txoj kev. Qhov no tuaj yeem ua los ntawm ntau txoj kev. Txij li ib txoj haujlwm no feem ntau tshwm sim piv rau cov ntawv sau thaum siv ua haujlwm nrog hypertext phab, nws ua rau muaj kev txiav txim siab, ua ntej txhua yam, txoj kev ua kom cov ntawv sau hauv cov lus nrov tshaj plaws hauv thaj chaw no - JavaScript, PHP, Perl.
Cov Lus Qhia
Kauj ruam 1
Yog hais tias tsab ntawv sau nyob rau hauv ib qho lus "cov neeg siv", tom qab ntawd nws txoj kev ua tiav, raws li txoj cai, tsis tas yuav tsum teeb tsa thiab pib ua haujlwm tshwj xeeb software. Piv txwv li, cov ntaub ntawv JavaScript sau thiab muab khaws cia rau hauv tus neeg siv lub koos pis tawj nrog nplooj ntawv lawv ntxiv rau hauv. Txhawm rau hu (ua kom) xws li cov ntawv, nrhiav nws cov ntawv thiab nyem ob. Txawm li cas los xij, nws yuav tsum nco ntsoov tias cov ntawv sau ua haujlwm hu rau cov ntsiab lus ntawm nplooj ntawv hauv nws sau. Yog tias koj qhib cov ntawv sau cais ntawm nplooj ntawv, tom qab ntawd koj yuav tsis pom cov cim ntawm nws cov haujlwm txhua - nws zoo dua los ua qhov no los ntawm kev thauj khoom "haiv" ntawm nplooj ntawv rau hauv browser.
Kauj ruam 2
Yog tias koj xav tau qhib cov neeg sau ntawv tom qab thau cov nplooj rau hauv tus neeg siv lub browser, tom qab ntawd nws hu tuaj yeem raug khi rau txhua yam kev tshwm sim - nias lub pob nyob rau hauv nplooj ntawv, hovering dhau ib qho kev ua haujlwm, tas sij hawm ntawm lub timer khiav thaum thauj khoom, thiab lwm yam Txhawm rau ua qhov no, siv cov cwj pwm tsim nyog tsim nyog. Muab tus ntawv txuas rau tsab ntawv hauv onClick attribute li ntawd nws yuav raug qhib ntawm nas nyem. Siv cov onFocus attribute yog tias koj xav kom JavaScript ua triggered thaum tus neeg siv pib sau ib daim teb hauv cov ntawv sau nkag. Cov kev tshwm sim onKeyDown thiab onKeyUp yuav pab ua kom qhov kev ua tiav ntawm tsab ntawv thaum tus yuam sij nias thiab tso tawm, onMouseOver - thaum tus nas cursor tau hovering, onMouseOut - ntawm qhov tsis sib haum, thaum tus chij txav mus, thiab lwm yam.
Kauj ruam 3
Yog tias koj xav tau qhib cov ntawv sau ua server (piv txwv, php lossis perl lus), tom qab ntawd ua nws los ntawm kev ntaus nws lub URL hauv qhov chaw nyob bar. Koj tuaj yeem ua tau xws li kev hloov pauv ntawm cov kab kev cai ntawm nplooj ntawv hauv txoj kev ib txwm (los ntawm kev siv), lossis los ntawm khi nws, raws li nyob rau theem yav dhau los, rau ib qho xwm txheej. Cov ntawv sau tawm ntawm server tsis tuaj yeem xa tawm yog tias nws tau yooj yim rub tawm thiab nias ob zaug - xws li cov ntawv sau yog tau siv hauv software tshwj xeeb. Yog li ntawd, txhawm rau qhib rau koj lub khoos phis tawm ntawm koj tus kheej, koj yuav tsum teeb tsa thiab khiav ntawm cov kev pabcuam tsim nyog - piv txwv li cov khoom siv Denver (https://denwer.ru) tuaj yeem coj qhov no.