
function q1,q2가 syntex error라고 뜹니다.
<script>
function q1() {
let txt = $('#input-q1').val()
if (txt == '') {
alert('빈칸입니다')
} else {
alert(txt)
}
}
function q2() {
let txt = $('#input-q2').val()
if (txt.includes('@')) == true) {
alert(txt.split('@')[1].spli('.')[0])
} else {
alert('이메일이 아닙니다')
}
}
function q3() {
// 1. input-q3 값을 가져온다. let txt = ... q1, q2에서 했던 걸 참고!
// 2. 가져온 값을 이용해 names-q3에 붙일 태그를 만든다. (let temp_html = `<li>${txt}</li>`) 요렇게!
// 3. 만들어둔 temp_html을 names-q3에 붙인다.(jQuery의 $('...').append(temp_html)을 이용하면 굿!)
}
function q3_remove() {
// 1. names-q3의 내부 태그를 모두 비운다.(jQuery의 $('....').empty()를 이용하면 굿!)
}
</script>
