English 中文(简体)
无线电台
原标题:Form with radio button
  • 时间:2010-09-28 08:53:33
  •  标签:
  • php
  • html

我有:

<td>
    <input id="sex" name="sexFemale" value="female" type="radio">
    <label for="sexFemale">
        Kvinna
    </label>
</td>
<td>
    <input id="sex" name="sexBoth" value="both" checked="checked" type="radio">
    <label for="sexBoth">
        Båda
    </label>
</td>
<td>
    <input id="sex" name="sexMale" value="male" type="radio">
    <label for="sexMale">
        Man
    </label>
</td>

我认为,我是这样错误的,我应如何使用?

<代码>_POST[“sex”],以获得“male”或“female”或其选择的价值

最佳回答

您应制定其<代码> 姓名/代码> 归属于“性别”,并具有传播价值:

<input type="radio" name="sex" value="female" />Female<br />
<input type="radio" name="sex" value="male" />Male<br />
问题回答

http://www.un.org/Depts/DGACM/index_french.htm

页: 1 (无线电台名称)称呼和不同的<代码>id属工作:

<td>
  <label><input id="sexFemale" name="groupSex" value="female" type="radio">
  Kvinna</label>
</td>
<td>
  <label><input id="sexBoth" name="groupSex" value="both" checked="checked" type="radio">
  Båda</label>
</td>  
<td>
  <label><input id="sexMale" name="groupSex" value="male" type="radio">
  Man</label>
</td>

i 认为某一组国家的所有无线电塔顿投入必须具有相同的名称:

Kvinna Båda
Man

美元_POST[性别]回报为“性别”的元素值。 供使用——将所有广播标称“性别”。

仅将<代码> 姓名/代码>属性与<代码>id属性。 因此,

<input id="sex" name="sexFemale" ...

公正使用

<input id="sexFemale" name="sex" ...




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签