From 8ecf5d328859d78e2fdc8f88eee9e46e896f1e44 Mon Sep 17 00:00:00 2001 From: sangjune Date: Mon, 27 Jul 2020 08:55:21 +0900 Subject: [PATCH] d --- src/App.js | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 112 insertions(+), 5 deletions(-) diff --git a/src/App.js b/src/App.js index e71d5d0..4898ff3 100644 --- a/src/App.js +++ b/src/App.js @@ -1,14 +1,121 @@ import React from 'react'; import logo from './logo.svg'; import './App.css'; +import ReactDOM from 'react-dom'; -function App() { +let answer=[] +function App(props) { + let correctAnswer = {"1번": 3, "2번": 4} + + return ( + <> +
+

Online-Quiz

+
+
+ 이름을 입력하세요 + { console.log(event.target.value) }} /> +
+ + + ); +} +function Next() { + return alert("다음문제") + //선택한 정답과 실제정답이 일치하는지 판별 +} + +function Quiz1() { + return ( + <> +

Q1. 3 + 3 = ?

+
① 2
+
② 4
+
③ 6
+
④ 8
+
+ 정답을 입력하세요 + + + +
+ + ); +} +function ShowQuiz1() { + ReactDOM.render( + + + , + document.getElementById('root') + ); +} +// function SelectAnswer(e){ +// let a = document.getElementById("number1").value +// answer.push(a) +// } + +function Quiz2() { return ( -
-

어떤 페이지가 나올까요? ^ ^

- 궁금합니다^ ^ -
+ <> +

Q1. 6 x 4 = ?

+
① 6
+
② 12
+
③ 18
+
④ 24
+
+ 정답을 입력하세요 + + + + + + + {localStorage.setItem('Answer1', 'select id') + , localStorage.getItem('Answer1'), localStorage.removeItem, localStorage.clear} + +
+ ); } +function ShowQuiz2() { + ReactDOM.render( + + + , + document.getElementById('root') + ); +} + +function Last() { + return ( + <> +
Quiz 완료
+

수고하셨습니다 !!

+ + ) +} +function Showlast() { + ReactDOM.render( + + + , + document.getElementById('root') + ); +} + export default App; +// export default Quiz1; \ No newline at end of file -- GitLab