I have my html code has two input: payment and total I have implemented a script with the keyup method to verify that the payment is greater than the total and show the input of type submit.
The input of type submit is shown only if the payment is greater than the total
This is my code:
<!DOCTYPE html>
<html>
<body>
<input type="text" id="x" onkeyup="myFunction()">
<input type="text" id="y" value="8">
<div id="boton"></div>
<script>
function myFunction() {
var x = Parsefloat(document.getElementById('x'));
var y = Parsefloat(document.getElementById('y'));
if(x>=y){
document.getElementById("boton").innerHTML="<input type="submit" id="boton">";
}
</script>
</body>
</html>
However, I have not achieved the validation, I will appreciate your suggestions