Using HTML
I want to use 2 checkbox, when i click the check box 1 then it will redirect to another page, when i click the check box 2 then it will redirect to another page.
How to make a code in HTML
Need Code Help
Using HTML
I want to use 2 checkbox, when i click the check box 1 then it will redirect to another page, when i click the check box 2 then it will redirect to another page.
How to make a code in HTML
Need Code Help
First of all checkboxes are not supposed to be used for redirection purpose, however if you really want to do that, you can go about something like this:
var el = document.getElementById('checkbox1_id');
el.onclick = function(){
document.location.href = 'somepage.html';
};
var el2 = document.getElementById('checkbox2_id');
el2.onclick = function(){
document.location.href = 'somepage2.html';
};
Radio buttons would be more appropriate. Can you explain the context?