打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

用户:Xp00000000/Sandbox:修订间差异

来自Rizline中文维基
Xp00000000留言 | 贡献
无编辑摘要
Xp00000000留言 | 贡献
无编辑摘要
 
(未显示同一用户的6个中间版本)
第1行: 第1行:
{|
<html>
|-
| width="100%" scope="row" colspan="2" style="text-align:center;background-color:#A9FBFF;"|<html>
<script>
<script>
function cycleTextData(element) {
// 切换难度(EZ 1 / HD 6 / IN 9)
   const states = JSON.parse(element.dataset.states || '["A", "B", "C"]');
function cycleDifficulty(element) {
   const currentIndex = parseInt(element.dataset.current || 0);
   const states = JSON.parse(element.dataset.states);
   const currentIndex = parseInt(element.dataset.current);
   const nextIndex = (currentIndex + 1) % states.length;
   const nextIndex = (currentIndex + 1) % states.length;
    
    
   element.textContent = states[nextIndex];
   element.textContent = states[nextIndex];
   element.dataset.current = nextIndex;
   element.dataset.current = nextIndex;
 
  updateOutput(); // 更新输出
}
}
</script>


<div onclick="cycleTextData(this)" data-states='["EZ 1", "HD 6", "IN 9"]'
// 切换比例(4:3 / 16:9)
    data-current="0" style="cursor:pointer;">
function cycleRatio(element) {
  EZ 1
   const states = JSON.parse(element.dataset.states);
</div>
   const currentIndex = parseInt(element.dataset.current);
</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;
   const nextIndex = (currentIndex + 1) % states.length;
    
    
   element.textContent = states[nextIndex];
   element.textContent = states[nextIndex];
   element.dataset.current = nextIndex;
   element.dataset.current = nextIndex;
 
  updateOutput(); // 更新输出
}
}
</script>


<div onclick="cycleTextData(this)" data-states='["4:3", "16:9"]'
// 根据当前难度和比例更新输出
    data-current="0" style="cursor:pointer;">
function updateOutput() {
  4:3
   const difficulty = document.getElementById("difficulty").textContent;
</div>
   const ratio = document.getElementById("ratio").textContent;
</html>|| abc
|}
-----
{{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;
   const outputRules = {
}
    "EZ 1": { "4:3": "111aaa", "16:9": "222aaa" },
</script>
    "HD 6": { "4:3": "111bbb", "16:9": "222bbb" },
 
    "IN 9": { "4:3": "111ccc", "16:9": "222ccc" }
<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;
  const output = outputRules[difficulty]?.[ratio] || "Unknown";
   document.getElementById("output").textContent = output;
}
}
</script>
</script>
 
<table width="100%" style="border:none; border-collapse:collapse;">
<div onclick="cycleTextData(this)" data-states='["4:3", "16:9"]'
  <tr>
    data-current="0" style="cursor:pointer;">4:3</div>
    <td colspan="2" style="text-align:center; background-color:#A9FBFF;"><div id="difficulty" onclick="cycleDifficulty(this)"  
</html>|ccc|png}}
     data-states='["EZ 1", "HD 6", "IN 9"]' data-current="0" style="cursor:pointer;">
 
<html>
<div class="state-container"  
     data-states='["EZ 1", "HD 6", "IN 9"]'  
    onclick="cycleAndDetect(this)">
   EZ 1
   EZ 1
</div>
</div></td>
 
  </tr>
<!-- 结果输出区域 -->
  <tr>
<div class="state-result"></div>
    <td 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;">
<script>
  4:3
function cycleAndDetect(element) {
</div></td>
  // 原始切换逻辑
    <td><span id="output">111aaa</span></td>
  const states = JSON.parse(element.dataset.states);
   </tr>
  const currentIndex = parseInt(element.dataset.current || 0);
</table>
  const nextIndex = (currentIndex + 1) % states.length;
  element.textContent = states[nextIndex];
  element.dataset.current = nextIndex;
 
  // 动态更新检测结果
  const resultDiv = element.closest('.state-container').nextElementSibling;
   resultDiv.textContent = `当前状态: ${states[nextIndex]}`;
}
</script>
</html>
</html>

2025年7月5日 (六) 10:45的最新版本

EZ 1
4:3
111aaa