2
I have 2 inputs of the type radio
. In them, I’m trying to trigger my JS method. However, by clicking on radio button, nothing is done. Neither gets into the JS function:
function onView1(){
alert("oi");
var x = document.getElementsByName("user_1");
if(x.value== 1){
location.href = "option_user.html";
}else {
alert("nao deu");
}
}
<tr>
<td>
<div align="center">
<br><br>
<img src="images/Untitled-1.jpg"><br><br>
<input type="radio" name="user_1" value="1" id="1" onkeyup="onView1()"/>
</div>
</td>
</tr>
They are 2 radio, I who did not post the rest of the code. What I want to do, is to click the radio, redirect to a specific page.
– user3527775