|
|
第1行: |
第1行: |
| |}
| |
| -----
| |
| {{Video|<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>|<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>|ccc|png}}
| |
|
| |
| <html> | | <html> |
| <script> | | <script> |