Ask coding questions

← Back to all posts
Anyone know a way to make the "DEL" button functional?
QuickV (80)

Title mostly explains it all... I can't figure out how I can make the "DEL" button functional...

Answered by ruiwenge2 (1105) [earned 5 cycles]
View Answer
Comments
hotnewtop
ruiwenge2 (1105)

use this code for the onclick attribute:

document.calc.txt.value = document.calc.txt.value.slice(0, document.calc.txt.value.length - 1)
QuickV (80)

It worked! Thank you :) @ruiwenge2

QuickV (80)

After seeing the hit/view counter it says that it's around 1500 ;-;... How many times did you refresh that page... @ruiwenge2

ruiwenge2 (1105)

@QuickV I didn’t refresh , I sent requests

QuickV (80)

Ah... That makes more sense lol. @ruiwenge2

ruiwenge2 (1105)

@QuickV i used the requests module in python, which is kinda like fetch

QuickV (80)

Ah... That means the view counter is broken @ruiwenge2