- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如何预选struts 1 html:radio按钮?
谢谢玛丽亚
最佳答案
您的 Form
对象中应该有一个值,用于保存单选按钮的数据。在转发到 JSP 之前,您需要在 Form
中预先填写该值(或者在 Form
的构造函数中默认它,如果它始终默认为该值) .
Action.java
form.setRadioValue("123");
View.jsp
<html:radio property="radioValue" value="123" /> // <-- this radio will be checked
<html:radio property="radioValue" value="456" /> // <-- this radio will not be checked
关于struts-1 - 如何预选struts html :radio button,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6883008/
我遇到过这个 html: 上面的html和这个有什么区别: 最佳答案 来自MDN page on the tag : 对于 type 的属性标签,可能的值是: 提交:按钮将表单数据提交给服务器
Button button= (Button) findViewbyID(R.id.button); 和 Button button = new Button(this); 有什么区别? 最佳答案 有
我是一名优秀的程序员,十分优秀!