diff --git a/jsq.html b/jsq.html
index 78e7422..8b8ecf5 100644
--- a/jsq.html
+++ b/jsq.html
@@ -82,6 +82,7 @@
+
@@ -94,6 +95,7 @@
function appendNumber(number) {
if (number === '.' && currentOperand.includes('.')) return;
+ if (number === '-' && currentOperand.length > 0) return; // 防止在数字中间添加负号
currentOperand += number;
updateDisplay();
}
@@ -150,4 +152,4 @@
}