Skip to content

Commit

Permalink
add autofocus
Browse files Browse the repository at this point in the history
  • Loading branch information
epigone707 committed Sep 2, 2023
1 parent a817638 commit d0b0fe4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
8 changes: 8 additions & 0 deletions history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@
2023/8/24 23:20,9,10
2023/8/24 23:21,0,25
2023/8/24 23:23,9,16
2023/9/2 09:31,10,6
2023/9/2 09:31,10,4
2023/9/2 09:35,10,5
2023/9/2 09:37,10,5
2023/9/2 09:38,10,4
2023/9/2 09:38,10,4
2023/9/2 09:40,10,6
2023/9/2 09:40,10,5
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div style="display:flex; flex-flow: wrap;">
<label for="inputText">请输入:</label>
<div class="form-outline">
<input type="text" id="inputText" class="form-control" />
<input type="text" id="inputText" class="form-control"/>
</div>
</div>
<p id="errorMsg" style="color: red;visibility: hidden;">请输入一个有效的数字。</p>
Expand Down Expand Up @@ -67,7 +67,7 @@ <h2>您的历史成绩(只显示近期100次测试) :</h2>

<button id="startButton" class="btn btn-primary">开始测试</button>
<button id="exitButton" class="btn btn-secondary" style="display: none;">退出测试</button>
<button id="historyButton" class="btn btn-secondary">历史成绩</button>
<button id="historyButton" class="btn btn-info">历史成绩</button>
<p id="msg" style="visibility: hidden;"></p>

</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typer",
"version": "1.0.0",
"version": "1.11.0",
"description": "A app that helps users practice reprint summons",
"main": "main.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,21 @@ $(document).ready(function () {

$("#startButton").css("display", "none");
$("#exitButton").css("display", "block");
$("#historyButton").css("display", 'none');
$("#msg").css("visibility", 'hidden');
document.getElementById("inputText").focus();
});

$("#exitButton").click(function () {
console.log('exit test')
numbersArray = [];
userInputArray = [];
$("#startButton").css("display", "block");
$("#historyButton").css("display", 'block');
$("#exitButton").css("display", "none");
$('#testPanel').css("display", 'none');
$("#scoreBoard").css("display", 'none');
$("#historyBoard").css("display", 'none');
clearInterval(intervalId);
$("#compareTable tbody tr").remove();
$("#countLabel").text("1");
Expand Down

0 comments on commit d0b0fe4

Please sign in to comment.