我與他們三人的提交表單來自具有不同ID的
他們兩個都還行,我用一個ID爲所有將成爲價值的提交表單值呼應提交
但一我現在掙扎的那些人當然是擁有所有不同價值觀的人,而選擇形式也有不同的ID,這讓我很難理解我如何迴應它。
<form action="" method="post">
<div data-role="fieldcontain">
<fieldset data-role="controlgroup" data-type="horizontal" >
<legend>เลือกช่อง</legend>
<input type="radio" name="radio-choice-1" id="radio-choice-1" value="ch41" checked="checked" />
<label for="radio-choice-1">number 1</label>
<input type="radio" name="radio-choice-1" id="radio-choice-2" value="ch80" />
<label for="radio-choice-2">number 2</label>
<input type="radio" name="radio-choice-1" id="radio-choice-3" value="ch44" />
<label for="radio-choice-3>"number 3</label>
<input type="radio" name="radio-choice-1" id="radio-choice-4" value="ch42" />
<label for="radio-choice-4">number 4</label>
<input type="radio" name="radio-choice-1" id="radio-choice-5" value="ch83" />
<label for="radio-choice-5">number 5</label>
</fieldset>
</div>
</form>
,這裏是什麼,我想呼應
<video width="5%" height="5%" src="http://mydomain:<?php echo $_POST["radio-choice-1"]; ?>-<?php echo $_POST["date"]; ?>-<?php echo $_POST["time"]; ?>" alt="" controls="" tabindex="0">
所以這個問題是關於"radio-choice-#"
因爲它的ID
5號這裏是例子
<input type="radio" name="radio-choice-1" id="radio-choice-2" value="ch80" />
<label for="radio-choice-2">number 2</label>
<input type="radio" name="radio-choice-1" id="radio-choice-3" value="ch44" />
<label for="radio-choice-3>"number 3</label>
<input type="radio" name="radio-choice-1" id="radio-choice-4" value="ch42" />
<label for="radio-choice-4">number 4</label>
<input type="radio" name="radio-choice-1" id="radio-choice-5" value="ch83" />
<label for="radio-choice-5">number 5</label>
所以,如果他們選擇菜單編號5
我想在這裏呼應
<video width="5%" height="5%" src="http://mydomain:<?php echo $_POST["the value of number 5"]; ?">
我注意到了兩件事:1)你錯過了3號和2號關閉'>')你在所有單選按鈕上定義了兩次名稱和id屬性。而且,一個特定的ID只能在句法上使用* once。您不能定義一個分區和五個單選按鈕來使用相同的ID。 – animuson
fyi,您在radio標籤3的'label'中缺少一個括號。 '
@animuson對不起,我忘了發佈原來的;我發佈了一個和我一起玩的遊戲[我說過的那個] – Ali