We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<img id="icon" src="img_1.png"></br> <button id="prev">上一张图片</button> <button id="next">下一张图片</button> <script> window.onload=function(){ //获取需要的标签 var icon=document.getElementById('icon'); var icon=document.getElementById('prev'); var icon=document.getElementById('next'); //监听按钮的点击 var max=10 , min=1 , current=1; prev.onclick=function(){ if(curren===min){ curren===max }else{ curren--; } icon.setAttribute("src","img_"+curren+".png"); } next.onclick=function(){ if(curren===max){ curren===min }else{ curren++; } icon.setAttribute("src","img_"+curren+".png"); } </script>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: