标签:span col win input unshift cti inpu 切换 char
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <script> window.onload=function(){ var oDiv=document.getElementById("div1"); var oInput=document.getElementById("input1"); oInput.onclick=function(){ var arr=oDiv.innerHTML.split(","); arr.push(arr[0]); //pop unshift arr.shift(); oDiv.innerHTML=arr; } } </script> </head> <body> <div id="div1">1,2,3,4</div> <input type="button" value="切换" id="input1"/> </body> </html>
标签:span col win input unshift cti inpu 切换 char
原文地址:https://www.cnblogs.com/gxywb/p/10228712.html