<html>
<head>
<title>JS倒序输出字符串</title>
<script>
function Show(){
var str="ABCDE";
var strShow="";
document.write(str+"<br>");
for(var i=str.length-1; i>=0; i--) {
strShow+=str.substring(i,i+1);
alert(strShow);
}
document.write("<font color=red>"+strShow+"</font>");
}
</script>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">Show();</SCRIPT>
</body>
</html>
JS倒序输出字符串
最新推荐文章于 2023-11-20 16:41:34 发布