|
|
第1行: |
第1行: |
| {|
| |
| |-
| |
| | width="100%" scope="row" colspan="2" style="text-align:center;background-color:#A9FBFF;"|<html>
| |
| <script>
| |
| function cycleTextData(element) {
| |
| const states = JSON.parse(element.dataset.states || '["A", "B", "C"]');
| |
| const currentIndex = parseInt(element.dataset.current || 0);
| |
| const nextIndex = (currentIndex + 1) % states.length;
| |
|
| |
| element.textContent = states[nextIndex];
| |
| element.dataset.current = nextIndex;
| |
| }
| |
| </script>
| |
|
| |
| <div onclick="cycleTextData(this)" data-states='["EZ 1", "HD 6", "IN 9"]'
| |
| data-current="0" style="cursor:pointer;">
| |
| EZ 1
| |
| </div>
| |
| </html>
| |
| |-
| |
| | width="15%" height="300px" style="text-align:center;background-color:#ABCDEF;" |<html>
| |
| <script>
| |
| function cycleTextData(element) {
| |
| const states = JSON.parse(element.dataset.states || '["A", "B"]');
| |
| const currentIndex = parseInt(element.dataset.current || 0);
| |
| const nextIndex = (currentIndex + 1) % states.length;
| |
|
| |
| element.textContent = states[nextIndex];
| |
| element.dataset.current = nextIndex;
| |
| }
| |
| </script>
| |
|
| |
| <div onclick="cycleTextData(this)" data-states='["4:3", "16:9"]'
| |
| data-current="0" style="cursor:pointer;">
| |
| 4:3
| |
| </div>
| |
| </html>|| abc
| |
| |} | | |} |
| ----- | | ----- |
第113行: |
第76行: |
|
| |
|
| <!-- 难度选择(EZ 1 / HD 6 / IN 9) --> | | <!-- 难度选择(EZ 1 / HD 6 / IN 9) --> |
| <div id="difficulty" onclick="cycleDifficulty(this)"
| | |
| data-states='["EZ 1", "HD 6", "IN 9"]' data-current="0" style="cursor:pointer;">
| |
| EZ 1
| |
| </div>
| |
|
| |
|
| <!-- 比例选择(4:3 / 16:9) --> | | <!-- 比例选择(4:3 / 16:9) --> |
| <div id="ratio" onclick="cycleRatio(this)"
| | |
| data-states='["4:3", "16:9"]' data-current="0" style="cursor:pointer;">
| |
| 4:3
| |
| </div>
| |
|
| |
|
| <!-- 输出结果 --> | | <!-- 输出结果 --> |
| <p>当前输出: <span id="output">111aaa</span></p> | | <p>当前输出: <span id="output">111aaa</span></p> |
| </html> | | </html> |
| | {| |
| | |- |
| | | width="100%" scope="row" colspan="2" style="text-align:center;background-color:#A9FBFF;"| <div id="difficulty" onclick="cycleDifficulty(this)" |
| | data-states='["EZ 1", "HD 6", "IN 9"]' data-current="0" style="cursor:pointer;">EZ 1</div> |
| | |- |
| | | width="15%" height="300px" style="text-align:center;background-color:#ABCDEF;" | <div id="ratio"onclick="cycleRatio(this)" data-states='["4:3", "16:9"]' data-current="0"style="cursor:pointer;">4:3</div> || <span id="output">111aaa</span> |