Yuav Ua Li Cas Los Ua Qhov Txuas Nrog Kev Hloov Mus Rau Qhov Txuas

Cov txheej txheem:

Yuav Ua Li Cas Los Ua Qhov Txuas Nrog Kev Hloov Mus Rau Qhov Txuas
Yuav Ua Li Cas Los Ua Qhov Txuas Nrog Kev Hloov Mus Rau Qhov Txuas

Video: Yuav Ua Li Cas Los Ua Qhov Txuas Nrog Kev Hloov Mus Rau Qhov Txuas

Video: Yuav Ua Li Cas Los Ua Qhov Txuas Nrog Kev Hloov Mus Rau Qhov Txuas
Video: 6 Nqi Lus Qhia Kev Ua neej ( leej twg mloog lub neej yuav zoo tuaj) 2024, Hlis ntuj nqeg
Anonim

Qee lub sijhawm nws tsim nyog yuav cia li xa cov qhua xaib los ntawm ib nplooj ntawv mus rau lwm qhov hauv "tsis siv neeg hom". Ntawd yog, nyuam qhuav nkag mus rau hauv thiab tam sim ntawd tsis muaj lus nug lossis nias dab tsi - thov mus rau lwm nplooj ntawv. Piv txwv li, lub vev xaib tau tsiv mus lawm, tab sis cov neeg qhua tseem tab tom mus rau qhov chaw nyob qub. Yog lawm, super-tshaj lij ua qhov kev hloov pauv ntawm theem ntawm ntxiv cov web server configuration files (htaccess) lossis server-side scripts. Tab sis nce ntau ntawm cov neeg nyob hauv Internet tau lawv tus kheej cov vev xaib thiab tswj hwm lawv zoo kawg nkaus yam tsis muaj kev kho kom haum xeeb ntawm superphies. Hmoov zoo, lub hauv paus ntsiab lus "rau txhua tus neeg uas xav tau - raws li lub xaib" tau nqis tes ua hauv lub network tsis muaj cov haujlwm hauv tebchaws thiab cov nyiaj qiv nyiaj yuav tsev. Yog li yuav ua li cas tau ib nteg tau siv tsis siv neeg hloov ntawm cov qhua rau qhov txuas muab?

Tsis siv neeg txuas nram qab no
Tsis siv neeg txuas nram qab no

Cov Lus Qhia

Kauj ruam 1

Muaj ob txoj hauv kev yooj yim dua kev xaiv uas yuav tsum tsis muaj dab tsi ntau dua li lub peev xwm los ua qhov kev hloov tsim nyog rau nplooj ntawv xav tau. Thawj daws qhov teeb meem los ntawm kev siv HTML (HyperText Markup Language - "hypertext markup language"). Nov yog cov lus uas cov nplooj ntawv hauv Is Taws Nem tau sau. Cov lus no muaj qhov cim npe uas peb xav tau - cov lus txib uas qhia qhov browser mus rau qhov chaw nyob twg thiab tom qab ntev npaum li cas cov neeg tuaj ncig cov nplooj ntawv xav tau xa. Nws zoo li qhov no:

Ntawm no, tus naj npawb "10" qhia txog pes tsawg lub vib nas this koj yuav tsum tau tos - piv txwv li, kom tus qhua tuaj yeem muaj sijhawm los nyeem cov xov uas lub chaw tau txav chaw. Thiab chaw nyob https://www.kakprosto.ru/ muab qhov browser rau URL uas cov qhua yuav tsum tau xa mus. Daim pib no yuav tsum tau muab tso rau hauv "nplooj ntawv kab ntawv" - thaj tsam ntawm html code pib nrog tus pib thiab xaus nrog daim pib.

Kauj ruam 2

Qhov thib ob hloov txheej txheem siv lub peev xwm ntawm cov hom lus JavaScript. Txhawm rau siv nws, koj yuav tsum sau cov lus txib uas tsim nyog hauv html-code ntawm nplooj ntawv. Ua ntej, koj yuav tsum qhia qhov browser tias JavaScript tsab ntawv pib txij ntawm no. Hauv JavaScript, qhov qhib daim pib zoo li no:

Thiab kaw ib qho yog zoo li no:

Nruab nrab ntawm ob lub cim yog cov lus qhia - cov neeg ua haujlwm hais lus. Qhov kev cuam tshuam cuam tshuam peb xav tau tuaj yeem ua tiav los ntawm ntau ntawm lawv:

window.location.reload ("https://www.kakprosto.ru/");

lossis

cov ntaub ntawv.hais chaw.replace ("https://www.kakprosto.ru/");

lossis

cov ntaub ntawv.location.href = "/";

Tsab ntawv sau tag yuav zoo li no:

cov ntaub ntawv.location.href = "/";

Tsab ntawv no tseem tuaj yeem raug tso rau hauv tib lub chaw sib txawv ntawm cov html-code - nruab nrab ntawm daim thiab cim npe. Txawm hais tias tsis tas yuav tsum tau, koj tuaj yeem nkag mus rau hauv lub cev tseem ceeb ntawm nplooj ntawv, uas yog, nruab nrab ntawm daim thiab cim npe.

Pom zoo: