Executar <input type dentro do java
Olá
Tenho um timer regressivo onde o tempo deve ser diferente dependendo do resultado. Mas eu não consigo executar o "<input type" dentro do java como:
<script>
if(window.addEventListener) {
<input type="submit" name="Submit" value="Baixar" id="timer" t=100 onclick="window.location.href= i+l;" >
} else {
<input type="submit" name="Submit" value="Baixar" id="timer" t=25 onclick="window.location.href= i+l;" >
}
</script><script>
Tentei também o codigo a baixo, mas "t=" nao reconhece o valor da var "novotempo":
<script>
if(window.addEventListener) {
var novotempo = 100
} else {
var novotempo = 25
}
</script><script>
<input type="submit" name="Submit" value="Baixar" id="timer" t=novotempo onclick="window.location.href= i+l;" >
Como eu poderia fazer? Alguém pode me ajudar.
Discussão (3)
Carregando comentários...