Showing
1 changed file
with
24 additions
and
0 deletions
quiz_4/2012104095.html
0 → 100644
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html lang="ko"> | ||
| 3 | +<head> | ||
| 4 | + <meta charset="UTF-8"> | ||
| 5 | + <title>Title</title> | ||
| 6 | +</head> | ||
| 7 | +<body> | ||
| 8 | + | ||
| 9 | +<button onclick="checkButtonClick()">CHECK</button> | ||
| 10 | + | ||
| 11 | +<script> | ||
| 12 | + | ||
| 13 | + | ||
| 14 | + function checkButtonClick() { | ||
| 15 | + var filename = prompt('파일 명을 입력하세요'); | ||
| 16 | + if(/\.html/g.test(filename)){ | ||
| 17 | + document.write(filename); | ||
| 18 | + } else { | ||
| 19 | + alert('HTML 파일명을 입력하시오') | ||
| 20 | + } | ||
| 21 | + } | ||
| 22 | +</script> | ||
| 23 | +</body> | ||
| 24 | +</html> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment