I am making a javascript calculator and have problem with decimals.I need them to output only once.I will show an example with dots (I need 0.55 and code can make 0....5).This code outputs "." right after some number was clicked,after that you can still click on symbol "." and it will write many dots in txtbox.Here is only one part of my code that you need

```
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
<style>
    button {
        user-select: none; 
        font-size:23px; 
        width:80px ; 
        height: 70px; 
        font-family:bold;
        border-radius: 50%;
        border-color: gray;
    }
    .ope{
        background: rgb(96, 250, 199);
    }
    .num:focus {
        background: lime;
    }

</style>
</head>

<body>
<input id="txtBox" type="text" style="text-align: right;font-size:60px;width: 325px;height: 125px; font-family: bold;" />
<br />
<button onclick="Click(event)" class="ope">C</button>
<button onclick="Click(event)" class="ope">delete</button>
<button onclick="Click(event)" class="ope">+/-</button>
<button onclick="Click(event)" class="ope">+</button>

<br />

<button onclick="Click(event)" class="num">1</button>
<button onclick="Click(event)" class="num">2</button>
<button onclick="Click(event)" class="num">3</button>
<button onclick="Click(event)" class="ope">-</button>

<br />

<button onclick="Click(event)" class="num">4</button>
<button onclick="Click(event)" class="num">5</button>
<button onclick="Click(event)" class="num">6</button>
<button onclick="Click(event)" class="ope">*</button>

<br />

<button onclick="Click(event)" class="num">7</button>
<button onclick="Click(event)" class="num">8</button>
<button onclick="Click(event)" class="num">9</button>
<button onclick="Click(event)" class="ope">/</button>

<br />

<button onclick="Click(event)" class="num">0</button>
<button onclick="Click(event)" id="ope">.</button>
<button onclick="Click(event)" id="equalto" style="background: rgb(206, 37, 206);user-select: none;font-size:25px; width:160px ; height: 70px; font-family:bold;">=</button>

<script>
    var nums = document.getElementById("num")
    var operator = document.getElementById("ope")
    var textbox = document.getElementById("txtBox")
    var counter = 0

    function Click(e) {
        var but = e.target;
        var maxamount = 9;
        var dot = 1
        if (but.innerText != "=" && but.innerText != "delete") {
            textbox.value += but.innerText
            if (but.innerText == "C") {
                textbox.value = "0"
            }
            else if (textbox.value[0] == "." || textbox.value[0] == "0" || textbox.value[0] == "+" || textbox.value[0] == "-" || textbox.value[0] == "/" || textbox.value[0] == "*") {
                textbox.value = ""
            }
            else if (textbox.value.length > maxamount) {
                textbox.value = textbox.value.substring(0, maxamount)
            }
            else if (textbox.value.includes == "+/-") {
                textbox.value*= -1
            }
            if (!textbox.value.includes('.') && textbox.value != "") {
                textbox.value+="."
            }
            else{

            }
        }

        else {
            textbox.value = eval(textbox.value)
        }
        if (but.innerText == "delete") {
            textbox.value = textbox.value.substring(0, textbox.value.length - 1);
        }
        if (textbox.value == "NaN" || textbox.value == "undefine") {
            textbox.value = ""
        }

    }
</script>
</body>

</html>

```