我已经在我的计算器上创建了 css html。我在为点按钮编写 js 代码时遇到问题。单击按钮一次后,我不想再写了。我应该怎么办?函数怎么写?这是示例代码:
<html>
<head>
<title></title>
<script language="javascript">
function nok(){
value = document.getElementById("rakamkutusu").value + '.';
document.getElementById("rakamkutusu").value = value;
}
</script>
</head>
<body>
<tr>
<input type='Text' class="deneme" id="rakamkutusu" name="rakam" size="70" value='0'></th>
</tr>
<tr>
<th><input name="btnNOKTA" type="Button" class="butonlar"id="nokta" value=" . " onclick="nok()"></th>
</tr>
</body>
</html>