CSS&JS/✨개인 프로젝트
보내드렸습니다~^^
arancia_
2022. 4. 21. 11:38
- 나무위키 ver : https://tinyurl.com/2hnmna48
- 고정 페이지 : https://tinyurl.com/3ky83xjx
- 글쓰기 페이지 : https://tinyurl.com/25zhdw2m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
const TIME = 2000;
async function init(URL) {
await change_text();
await change_url(URL);
}//init
function change_text() {
return new Promise(res => {
setTimeout(() => {
const $text = document.querySelector('.text');
$text.textContent = '요청 성공';
res();
}, TIME);
});
}//change_text
function change_url(URL) {
setTimeout(() => {
location.href = URL;
res();
}, TIME / 2);
}//change_url
|
cs |