由于这不容易解释,这里有一张导致麻烦的“选择”图片:html month select
我找不到这些字母对应的内容的逻辑,所以我很难找到解决这个问题的方法。
在我的Rails应用程序中集成'i18n'后出现问题。
以下是在i18n之前使用的表单的代码:
revalidate: Name: null, super.Parent: null, this.Parent: null, preferredSize: [0.0, 0.0]
revalidate: Name: null, super.Parent: null, this.Parent: null, preferredSize: [0.0, 0.0]
revalidate: Name: null, super.Parent: null, this.Parent: null, preferredSize: [0.0, 0.0]
revalidate: Name: null, super.Parent: null, this.Parent: null, preferredSize: [0.0, 0.0]
1- Frame: Class: testing.ParentNullExample, Name: frame0, H: 61, W: 132
2|- Container: Name: mainPanel, Class: testing.Panel1, Layout: javax.swing.BoxLayout, H: 23, W: 116
3|-- Component: Class: testing.Panel1, Name: componentPanel, H: 0, W: 116
3|-- Component: Class: javax.swing.JButton, Name: AddButton, H: 23, W: 85
revalidate: Name: mainPanel, super.Parent: null.layeredPane, this.Parent: null.layeredPane, preferredSize: [23.0, 85.0]
revalidate: Name: mainPanel, super.Parent: null.layeredPane, this.Parent: null.layeredPane, preferredSize: [23.0, 85.0]
答案 0 :(得分:0)
好的,所以我无法找到它的来源,但这是我为使用某些jQuery遇到同样问题的人所做的修复:
var month = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
var count = 0
$("#dog_birthdate_2i > option").each(function(i, item) {
$(item).text(month[count]);
count += 1
});