Nws yog qhov ua tau los npaj qhov kev hloov mus ib ntus ntawm txhua tus qhua ntawm ib nplooj ntawv tshwj xeeb mus rau lwm lub xaib los ntawm kev siv ntawm lub server thiab server-sab programming lus, lossis siv HTML thiab JavaScript. Qhov zoo ntawm qhov kev xaiv thib ob yog kev yoojyim thiab siv tau yooj yim - kom siv nws, tsis muaj kev paub txog kev paub lub caj dab; ntawm qhov yuav tsum tau ua, koj tsuas xav tau nkag mus kho cov nplooj ntawv qhov chaws.
Cov Lus Qhia
Kauj ruam 1
Koj tuaj yeem daws qhov teeb meem ntawm kev xa ncaj qha rau cov neeg tuaj saib rau lwm qhov chaw tsuas yog siv HTML (HyperText Markup lus - "hypertext markup language"). Nws muaj cov lus txib (meta tag) uas qhia qhov browser tias tom qab thauj khoom ntawm nplooj ntawv tam sim no, lwm tus yuav tsum pib thauj khoom. Daim meta tag no muaj cov ntaub ntawv (cov cim ua haujlwm) txog qhov chaw nyob hloov pauv thiab lub sijhawm tom qab uas qhov kev thov yuav tsum raug xa mus rau nplooj ntawv ntawm lwm lub xaib. Piv txwv li, nws yuav zoo li qhov no: ntawm Refresh ntawm no yog lo lus code uas pib txoj kev hloov kho tshuab. Naj npawb 5 qhia tau hais tias cov txheej txheem yuav tsum pib 5 vib nas this tom qab thauj nplooj ntawv no. Lub sijhawm no yuav xav tau rau tus qhua, piv txwv, kom nws muaj sijhawm los nyeem cov lus uas koj tau tso rau nplooj ntawv no. Yog tias qhov kev so tsis tas yuav tsum tau, tso xoom. Thiab URL = https://www.kakprosto.ru muaj qhov chaw nyob uas tus browser yuav xa tus qhua. Daim meta no yuav tsum tau muab tso rau hauv ສ່ວນ header ntawm nplooj ntawv kab ntawv - ntawm qhov thiab tag.
Kauj ruam 2
Lwm txoj hauv kev yog siv lub npe JavaScript programming. Koj tsuas yog xav tau ib txoj kab ntawm kev cai taw qhia lub vev xaib surfer mus rau qhov chaw nyob raug. Nws tuaj yeem saib, piv txwv, zoo li qhov no: window.location.reload ("https://www.kakprosto.ru"); Los yog zoo li no: document.location.replace ("https://www.kakprosto.ru"); Los yog li ntawv: document.location.href = "/"; Ntawm no koj tsuas xav hloov chaw nyob nrog tus koj xav tau. Qhov lus txib no yuav tsum muab tso rau sab hauv cov cim npe uas qhia qhov browser tias nws tau sau rau hauv JavaScript:
cov ntaub ntawv.hais chaw.replace ("https://www.kakprosto.ru");
Thiab peb txoj kab no, nyeg, zoo dua tso rau sab hauv tib thaj chaw (nruab nrab thiab).
Kauj ruam 3
Tom qab koj xaiv ib qho ntawm cov kev xaiv no, qhib nplooj ntawv xav tau, piv txwv li, hauv nplooj ntawv editor ntawm cov txheej txheem kev tswj hwm cov ntsiab lus. Hloov mus rau HTML kho hom thiab pom cov cim npe hauv nws. Luam tawm cov kab cim tau npaj rov qab (JavaScript lossis HTML) thiab muab tshuaj txhuam nws ua ntej lub cim no. Tom qab ntawv txuag nplooj ntawv hloov.