Skip to content

🤖 Cannot save fiddle #2399

@tunghahihi41-glitch

Description

@tunghahihi41-glitch

Error code

ERRW:0.75:L0.65:FHD0.1

Were you logged in?

Yes

Your username (if logged in)

No response

Your HTML

<div class="container">
    <div id="screen1" class="screen active">
        <h1>Xin chào Tùng!</h1>
        <p>Hệ thống dò bài & chấm điểm A.I Plus</p>
        <button class="btn" onclick="goToScreen(2)">Bắt đầu</button>
    </div>

    <div id="screen2" class="screen">
        <h2>Chọn môn học</h2>
        <div class="option-grid">
            <button class="btn" onclick="selectSubject('Toán')">Toán</button>
            <button class="btn" onclick="selectSubject('Văn')">Ngữ Văn</button>
            <button class="btn" onclick="selectSubject('Anh')">Tiếng Anh</button>
            <button class="btn" onclick="selectSubject('Sử')">Lịch Sử</button>
            <button class="btn" onclick="selectSubject('Địa')">Địa Lý</button>
            <button class="btn btn-secondary" onclick="goToScreen(1)">Thoát</button>
        </div>
    </div>

    <div id="screen3" class="screen">
        <h2>Dán ĐÁP ÁN gốc vào đây</h2>
        <p style="font-size: 12px; color: #8b949e;">(Dán văn bản hoặc ảnh chứa kiến thức bạn cần thuộc)</p>
        <textarea id="original-data" placeholder="Ví dụ: Chiến thắng Điện Biên Phủ diễn ra năm 1954..."></textarea>
        <div class="upload-area" id="drop-zone">Hoặc dán ảnh tại đây (Ctrl+V)</div>
        <button class="btn" onclick="generateQuiz()">Tạo đề dò bài</button>
    </div>

    <div id="screen4" class="screen">
        <h2 id="quiz-title">Đang dò bài...</h2>
        <p>Hãy ghi lại những gì bạn nhớ:</p>
        <textarea id="user-answer" placeholder="Nhập bài làm của bạn vào đây..."></textarea>
        <button class="btn btn-score" onclick="calculateScore()">Nộp bài & Chấm điểm</button>
    </div>

    <div id="screen5" class="screen">
        <h2>Kết Quả Dò Bài</h2>
        <div class="score-circle" id="final-score">0%</div>
        <p id="feedback-text"></p>
        <div style="text-align: left; background: #0d1117; padding: 10px; border-radius: 8px; font-size: 13px;">
            <b style="color: #58a6ff;">Đáp án gốc:</b> <br> <span id="view-original"></span>
        </div>
        <button class="btn" onclick="goToScreen(1)" style="margin-top: 15px;">Dò bài mới</button>
    </div>
</div>

Your JavaScript

let currentSubject = "";

    function goToScreen(num) {
        document.querySelectorAll('.screen').forEach(s => s.classList.remove('active'));
        document.getElementById('screen' + num).classList.add('active');
    }

    function selectSubject(name) {
        currentSubject = name;
        goToScreen(3);
    }

    // Xử lý dán ảnh vào Màn hình 3

Your CSS

body { font-family: 'Segoe UI', sans-serif; background: #0d1117; color: white; display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; }
        .container { background: #161b22; padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); width: 500px; text-align: center; border: 1px solid #30363d; margin: 20px; }
        .screen { display: none; }
        .active { display: block; animation: fadeIn 0.4s; }
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
        h1 { color: #58a6ff; }
        .btn { background: #238636; color: white; border: none; padding: 12px; border-radius: 8px; cursor: pointer; font-size: 15px; margin: 8px 0; transition: 0.2s; font-weight: bold; width: 100%; }
        .btn:hover { background: #2ea043; transform: translateY(-2px); }
        .btn-score { background: #f0883e; }
        .btn-secondary { background: #21262d; border: 1px solid #30363d; }
        .option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .upload-area { border: 2px dashed #30363d; padding: 20px; border-radius: 12px; cursor: pointer; color: #8b949e; }
        textarea { width: 92%; height: 120px; background: #0d1117; color: #c9d1d9; border: 1px solid #30363d; border-radius: 8px; padding: 12px; margin-top: 10px; font-size: 14px; resize: none; }
        .score-circle { width: 100px; height: 100px; border-radius: 50%; border: 5px solid #58a6ff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: bold; margin: 20px auto; color: #4ecca3; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions