1
나에게 나쁜 소식을 말해 줄 수 있습니까? 다음 웹 사이트에서 계속하려면 버튼 선택 언어 만 선택하면됩니다.어떻게 C로 입력 라디오 값을 얻을 수 #
,536,913,632 : HTML<asp:Content ID="BodyContent" ContentPlaceHolderID="BodySite" runat="server">
<h1>Výběr jazyka:</h1>
<p>Choose language | Sprachauswahl</p>
<form method="post" action="index.aspx">
<div class="checkbox-test">
<table style="border-spacing: 5px; border-collapse: separate;">
<tr>
<td>
<input type="radio" name="check_lang" id="check_cz" class="css-checkbox" value="cz" />
<label for="check_cz" class="css-label"><img src="http://terquil.cz/images/cz.png" class="img-flag" alt="CZ" /></label>
</td>
<td><h2>CZ</h2></td>
</tr>
<tr>
<td>
<input type="radio" name="check_lang" id="check_en" class="css-checkbox" value="en" />
<label for="check_en" class="css-label"><img src="http://terquil.cz/images/uk.png" class="img-flag" alt="EN" /></label>
</td>
<td><h2>EN</h2></td>
</tr>
<tr>
<td>
<input type="radio" name="check_lang" id="check_de" class="css-checkbox" value="de" />
<label for="check_de" class="css-label"><img src="http://terquil.cz/images/de.png" class="img-flag" alt="DE" /></label>
</td>
<td><h2>DE</h2></td>
</tr>
</table>
</div>
<input Type="submit" id="language_btn" VALUE="Pokračovat | Continue | Andere" >
</form>
C#
는
protected void submit(object sender, EventArgs e)
{
string cz = "cz";
string de = "de";
string en = "en";
if (Request.Form["check_lang"] != null)
{
string selectLanguage = Request.Form["check_lang"].ToString();
if (selectLanguage == cz)
Response.Redirect("http://terquil.cz/cs/index.aspx");
if (selectLanguage == en)
Response.Redirect("http://terquil.cz/en/index.aspx");
if (selectLanguage == de)
Response.Redirect("http://terquil.cz/cs/index.aspx");
}
}
CSS 그룹 객체 (난이 있지만 그나마 작업을 시도) 10
input[type=radio].css-checkbox { position:absolute; z-index:-1000; left:-1000px; overflow: hidden; clip: rect(0 0 0 0); height:1px; width:1px; margin:-1px; padding:0; border:0; } input[type=radio].css-checkbox + label.css-label { padding-left:37px; height:32px; display:inline-block; line-height:32px; background-repeat:no-repeat; background-position: 0 0; font-size:32px; vertical-align:middle; cursor:pointer; } input[type=radio].css-checkbox:checked + label.css-label { background-position: 0 -32px; } label.css-label { background-image:url(http://csscheckbox.com/checkboxes/u/csscheckbox_c1a4f40d98f1c23d1ad84d2af9c314be.png); -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; }
누군가가 자신의 언어로 라디오를 선택하고 제출 버튼을 클릭하면 리디렉션하여 해당 언어의 html 페이지를 지정해야합니다.
당신은 작동하지 않습니다 무엇을 의미합니까? – Darren
내가 웹 페이지를 지정하도록 리디렉션하지 않는 것보다 제출 버튼을 클릭하면됩니다. –
코드를 디버깅하고 단계별로 실행하면'Request.Form [ "check_lang"] ' – Pete