【发布时间】:2011-10-22 13:30:49
【问题描述】:
请帮我解决这个问题,我处于中间状态,无法继续进行,因为我的代码效率低下且无法理解...
我有一系列代码,如下所示..
var codes=[["header1","<input type='radio'>","option2","option3"],["header2","<input type='radio'>","option5","option6"],["header3","<input type='radio'>","option8","option9"]];
否则请检查此小提琴以检查我的进度...
http://jsfiddle.net/FgVGR/1/
在我的 HTML 中,我将有 3 个 DIV 标签
DIV(class name="headerHolder") -- This is to hold header text from the array.
DIV(class name="optionHolder") -- This contains the options related to each header displayed(Options will be next to the header element[index 0]).
DIV Options contains options and radio button.
DIV(class name="navigation") with next button with ID "next" and back button with id "back".
基本上 DIV 将与第一个数组元素一起显示,即 headerHolder 中的 Header1 和单选按钮,option2 和 optionHolder DIV 中的选项 3。如果单击单选按钮并单击下一步按钮,则下一个数组元素,即以 header2 开头的元素将是显示在 headerHolder 和 optionHolder 中。检查单选按钮是移动到下一个数组的资格。如果单击后退按钮,则当前数组的上一个数组项应与上一个给定的单选按钮响应一起显示... optionHolder 中的选项应显示在两列中。目前我正在使用标签但无法显示..
请帮我解决这个问题...这就是我想要做的......
【问题讨论】:
-
当你半途而废时,很难理解你想要什么。
标签: javascript jquery