<\/path><\/svg><\/span><form<\/span> <\/span>onsubmit<\/span>=<\/span>"<\/span>return validateForm()<\/span>"<\/span>><\/span><\/span>\n <\/span><input<\/span> <\/span>type<\/span>=<\/span>"<\/span>text<\/span>"<\/span> <\/span>id<\/span>=<\/span>"<\/span>name<\/span>"<\/span> <\/span>placeholder<\/span>=<\/span>"<\/span>\uc774\ub984\uc744 \uc785\ub825\ud558\uc138\uc694<\/span>"<\/span>><\/span><\/span>\n <\/span><input<\/span> <\/span>type<\/span>=<\/span>"<\/span>submit<\/span>"<\/span> <\/span>value<\/span>=<\/span>"<\/span>\uc81c\ucd9c<\/span>"<\/span>><\/span><\/span>\n<\/form><\/span><\/span>\n<\/span>\n<script><\/span><\/span>\n function validateForm() <\/span>{<\/span><\/span>\n <\/span>const<\/span> <\/span>name<\/span> <\/span>=<\/span> <\/span>document<\/span>.<\/span>getElementById<\/span>(<\/span>"<\/span>name<\/span>"<\/span>)<\/span>.<\/span>value<\/span>;<\/span><\/span>\n <\/span>if<\/span> (<\/span>name<\/span> <\/span>==<\/span> <\/span>""<\/span>) <\/span>{<\/span><\/span>\n <\/span>alert<\/span>(<\/span>"<\/span>\uc774\ub984\uc744 \uc785\ub825\ud574\uc57c \ud569\ub2c8\ub2e4!<\/span>"<\/span>)<\/span>;<\/span><\/span>\n return false;<\/span><\/span>\n <\/span>}<\/span><\/span>\n <\/span>return<\/span> <\/span>true<\/span>;<\/span><\/span>\n <\/span>}<\/span><\/span>\n<\/script><\/span><\/span><\/code><\/pre><\/div>\n\n\n\n2. \ub3d9\uc801\uc778 \ucf58\ud150\uce20 \uc5c5\ub370\uc774\ud2b8<\/strong>: JavaScript\ub97c \uc0ac\uc6a9\ud558\uba74 \ud398\uc774\uc9c0\ub97c \uc0c8\ub85c \uace0\uce68\ud558\uc9c0 \uc54a\uace0\ub3c4 HTML \uc694\uc18c\uc758 \ub0b4\uc6a9\uc744 \ub3d9\uc801\uc73c\ub85c \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n