javascript - HTML page with Radio Buttons -


i'm trying figure out how radio buttons direct me webpage after make selection , hit submit. code have far.

<!doctype html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"> <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> </head> <body>  <div data-role="page">   <div data-role="header">   <h1>radio buttons</h1>   </div>    <div data-role="main" class="ui-content">     <form method="post" action="demoform.asp">       <fieldset data-role="controlgroup">       <legend>choose website:</legend>         <label for="espn.com">espn.com</label>         <input type="radio" name="website" id="espn.com" value="http://espn.go.com">         <label for="facebook.com">facebook.com</label>         <input type="radio" name="website" id="facebook.com" value="https://www.facebook.com">         <label for="apple.com">apple.com</label>         <input type="radio" name="website" id="apple.com" value="http://www.apple.com">        </fieldset>         <input type="submit" data-inline="true" value="submit">     </form>   </div> </div>  </body> </html> 

you should add event onclick = "document.location.href='somepage.htm'" inside input radio tag


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -