Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery redirect to another page on radio button

<input type="radio" name="value" value="google"><span>Google</span><br>
<input type="radio" name="value" value="yahoo"><span>Yahoo</span><br>
<input type="radio" name="value" value="bing"><span>Bing</span>


$(function() {
$("input[name$='value']").click(function() {
    var value = $(this).val();
    if (value == 'google') {
        window.location.assign("http://www.google.com");
    }
    else if (value == 'yahoo') {
        window.location.assign("http://www.yahoo.com");
    }
    else if (value == 'bing') {
        window.location.assign("http://www.bing.com");
    }
});});
Comment

PREVIOUS NEXT
Code Example
Javascript :: replace text with hyperlink 
Javascript :: display js variable in html without + 
Javascript :: js to es6 convertor 
Javascript :: should i use map for form fields react 
Javascript :: express pass data between middleware 
Javascript :: convert typescript to js online 
Javascript :: 9.4.1.2. Loop Condition&para; 
Javascript :: javascript grow function 
Javascript :: Public properties can be created via Static public fields 
Javascript :: getelementsbyclassname angular 
Javascript :: utterances reactjs 
Javascript :: write a program to print patter usign recursion in javascript 
Javascript :: twitter user profile regex javascript 
Javascript :: get output dir from webpack options 
Javascript :: how to identify the li anchor tag text is empty in javascript 
Javascript :: regex match caret 
Javascript :: JavaScript Normalized and UnNnormalized URL 
Javascript :: Default function arguments in ES6 
Javascript :: where is the waypoint json file lunar client mac 
Javascript :: svg documentation 
Javascript :: Parents, Children & Siblings 
Javascript :: javascript slider elementor 
Javascript :: btn click on click file javascript 
Javascript :: discord js kick command 
Javascript :: node fs stream pipe promise 
Javascript :: amcharts 3d column chart export 
Javascript :: find regx for password authentication 
Javascript :: js find :invalid inside div 
Javascript :: yup password match 
Javascript :: solana solana-Web3.js change for devnet lamports to production transaction 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =