In my panel I need a button that creates a progressive number for me
I tried this code
If I upload it to Google it works perfectly
but if I put it in the panel it doesn’t work
why doesn’t it work in the panel?
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>
var seq=0;
function myFunction() {
seq=seq+1;
document.getElementById("sequence").value = seq;
}
</script>
<sp-button onclick="myFunction()">Try it</sp-button>
<input id="sequence" type="text">
</body>
</html>