'commit'
This commit is contained in:
@@ -110,5 +110,7 @@
|
|||||||
<!-- 引入看板娘相关脚本 -->
|
<!-- 引入看板娘相关脚本 -->
|
||||||
<script src="https://l2dwidget.js.org/lib/L2Dwidget.min.js"></script>
|
<script src="https://l2dwidget.js.org/lib/L2Dwidget.min.js"></script>
|
||||||
<script src="live2d_widget.js"></script>
|
<script src="live2d_widget.js"></script>
|
||||||
|
<!-- 将物理测验脚本移至此处 -->
|
||||||
|
<script src="physics_quiz.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@@ -274,6 +274,33 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
// 渲染题目
|
// 渲染题目
|
||||||
renderQuestions();
|
renderQuestions();
|
||||||
|
|
||||||
|
// 添加录音按钮事件绑定
|
||||||
|
const startRecordBtn = document.getElementById('startRecordBtn');
|
||||||
|
const stopRecordBtn = document.getElementById('stopRecordBtn');
|
||||||
|
const recordingIndicator = document.getElementById('recordingIndicator');
|
||||||
|
|
||||||
|
if (startRecordBtn && stopRecordBtn && recordingIndicator) {
|
||||||
|
startRecordBtn.addEventListener('click', function() {
|
||||||
|
// 显示录音指示器
|
||||||
|
recordingIndicator.style.display = 'block';
|
||||||
|
// 这里添加实际录音功能逻辑
|
||||||
|
console.log('开始录音...');
|
||||||
|
// 示例:调用录音API或相关函数
|
||||||
|
// startRecording();
|
||||||
|
});
|
||||||
|
|
||||||
|
stopRecordBtn.addEventListener('click', function() {
|
||||||
|
// 隐藏录音指示器
|
||||||
|
recordingIndicator.style.display = 'none';
|
||||||
|
// 这里添加停止录音功能逻辑
|
||||||
|
console.log('停止录音...');
|
||||||
|
// 示例:停止录音并处理音频
|
||||||
|
// stopRecording();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.error('录音相关DOM元素未找到');
|
||||||
|
}
|
||||||
|
|
||||||
// 提交当前难度的答案
|
// 提交当前难度的答案
|
||||||
submitBtn.addEventListener('click', function() {
|
submitBtn.addEventListener('click', function() {
|
||||||
const currentAnswers = correctAnswers[quizState.currentDifficulty];
|
const currentAnswers = correctAnswers[quizState.currentDifficulty];
|
||||||
|
Reference in New Issue
Block a user