2012-11-08 10 views
-1

의 링크를 사용하면 제출 한 후 선택한 페이지에 링크하기 위해 일부 라디오 버튼이있는 양식을 사용할 수 있습니까? 그래서 첫 라디오 버튼을 선택하고 버티션을 제출하고 url을 받았다. /angebote.html라디오 버튼

Thx!

<form id="aktion"> 
      <div class="action-check"> 
      <input class="radio" type="radio" value="angebote.html" name="suche"> 
      <label for="suche">Ich suche ein Zimmer</label> 
      </div> 
      <div class="action-check"> 
      <input class="radio" type="radio" value="angebotseingabe.html" name="biete"> 
      <label for="biete">Ich biete ein Zimmer</label> 
      </div> 
      <div class="action-check"> 
      <input class="radio" type="radio" value="gesuchseingabe.html" name="gruenden"> 
      <label for="gruenden">Ich möchte eine WG gründen</label> 
     </div> 
      <div class="submit_container"> 
      <input class="submit" type="submit" value="Los geht's"> 
     </div> 
    </form> 

답변

0

다음과 같이 javascript를 사용할 수 있습니다.

<HTML> 
    <HEAD> 
     <SCRIPT language="javascript"> 
       function choiceprop(form3) { 
        var url = <!-- check the good case here --> 
        window.location = url; 
       } 
      </SCRIPT> 
    </HEAD> 
    <BODY> 
     <FORM NAME="formtest"> 
      <INPUT TYPE="radio" NAME="choice" VALUE="url1">name1<BR> 
      <INPUT TYPE="radio" NAME="choice" VALUE="url2">name2<BR> 
      <INPUT TYPE="radio" NAME="choice" VALUE="url3">name3<BR> 
      <INPUT TYPE="button"NAME="but" VALUE="Validate" onClick="choiceprop(formtest)"> 
     </FORM> 
    </BODY> 
</HTML> 
+0

이것은 매력처럼 작동합니다. http : //stackoverflow.com/questions/6741340/radio-button-to-open-pages –