单选按钮不来
Radio Buttons not coming
这是一个非常基本的问题。我在 jsp 页面中创建了两个单选按钮。按钮即将到来,但用户可以 select 这两个按钮。它不表现为单选按钮。这是我的 jsp 代码
<div class="list list2" id = "userPreference">
<div id= "preferenceResultMessage"></div>
<input type="radio" name="sortByPrice" value=""/> <span class="text">Sort by Price </span>
<input type="radio" name="sortByTime" value=""/> <span class="text">Sort by Delivery time</span>
<input type="submit" name="submit" class="submit" value="Submit" onclick = "loadPreference()" />
</div>
到link单选按钮,它们需要有相同的名称属性。例如:
<div id= "preferenceResultMessage"></div>
<input type="radio" name="sortBy" value=""/> <span class="text">Sort by Price </span>
<input type="radio" name="sortBy" value=""/> <span class="text">Sort by Delivery time</span>
<input type="submit" name="submit" class="submit" value="Submit" onclick = "loadPreference()" />
</div>
这是一个非常基本的问题。我在 jsp 页面中创建了两个单选按钮。按钮即将到来,但用户可以 select 这两个按钮。它不表现为单选按钮。这是我的 jsp 代码
<div class="list list2" id = "userPreference">
<div id= "preferenceResultMessage"></div>
<input type="radio" name="sortByPrice" value=""/> <span class="text">Sort by Price </span>
<input type="radio" name="sortByTime" value=""/> <span class="text">Sort by Delivery time</span>
<input type="submit" name="submit" class="submit" value="Submit" onclick = "loadPreference()" />
</div>
到link单选按钮,它们需要有相同的名称属性。例如:
<div id= "preferenceResultMessage"></div>
<input type="radio" name="sortBy" value=""/> <span class="text">Sort by Price </span>
<input type="radio" name="sortBy" value=""/> <span class="text">Sort by Delivery time</span>
<input type="submit" name="submit" class="submit" value="Submit" onclick = "loadPreference()" />
</div>