javascript/fundamental
prompt
날아올라↗↗
2016. 1. 7. 13:39
728x90
반응형
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Insert title here</title>
- <script type="text/javascript">
- window.onload = function() {
- var strName = prompt("What's your name?", "");
- if (strName == "yangssem") {
- alert("Your name is "+strName+"! Good for you!");
- } else {
- alert("Your name isn't "+strName+". Bummer.");
- }
- }
- </script>
- </head>
- <body>
- </body>
- </html>
728x90
반응형