<script>
function q1() {
let txt = $(`#input-q1`).val();
if (txt == '') {
alert('입력하세요!')
} else {
alert(txt)
}
}
function q2() {
let txt = $(`#input-q2`).val();
if (txt.includes('@')) {
let domain = txt.split('@')[1].split('.')[0]
alert(domain)
} else {
alert('이메일이 아닙니다.')
}
}
function q3() {
let txt = $(`#input-q3`).val();
let temp_html = `<li>${txt}</li>`
$('#names-q3').append(temp_html)
}
function q3_remove() {
$('#names-q3').empty()
}
</script>