Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Post具有重复的属性_Html_Post - Fatal编程技术网

Html Post具有重复的属性

Html Post具有重复的属性,html,post,Html,Post,问题是:我的表单中有单选按钮。默认选中一个单选按钮。当我选中另一个并按下apply(应用)按钮时,我有一个带有重复属性但值不同的$u POST: 国家:55 国家:72 第二个是先前检查的值。预期只有一个属性。 我不明白为什么会这样 <div id="countries"> <table> <tr> <td> <input name="country" type="radio" valu

问题是:我的表单中有单选按钮。默认选中一个单选按钮。当我选中另一个并按下apply(应用)按钮时,我有一个带有重复属性但值不同的$u POST: 国家:55 国家:72 第二个是先前检查的值。预期只有一个属性。 我不明白为什么会这样

<div id="countries">
    <table>
    <tr>
        <td>
            <input name="country" type="radio" value="14" id="country_14" checked="checked"/>&nbsp;<label for="country_14">Austria</label>
        </td>
        <td>
            <input name="country" type="radio" value="117" id="country_117"/>&nbsp;<label for="country_117">Latvia</label>
        </td>
    </tr>
    <tr>
        <td>
            <input name="country" type="radio" value="21" id="country_21"/>&nbsp;<label for="country_21">Belgium</label>
        </td>
        <td>
            <input name="country" type="radio" value="123" id="country_123"/>&nbsp;<label for="country_123">Lithuania</label>
        </td>
    </tr>
    <tr>
        <td nowrap>
            <input name="country" type="radio" value="33" id="country_33"/>&nbsp;<label for="country_33">Bulgaria</label>
        </td>
        <td nowrap>
            <input name="country" type="radio" value="124" id="country_124"/>&nbsp;<label for="country_124">Luxembourg</label>
        </td>
    </tr>
    </table>
</div>

可能该帖子是一个数组帖子,比如:

<form action="." method="POST">
 <input value="val1" name="name[0]">
 <input value="val2" name="name[1]">
 <input type="sumbit" value="Submit">
</form>

你能帮我们发布你的HTML吗?你能给我们看一下那张表格的HTML代码吗?