window.onload=function(){
var str="abaasdFFggs3545jjkkGfDDsssss3444343";
var str2="";
var n=0
for(var i=0;i<str.length;i++){
n++
if(str[i]>="a"&&str[i]<="z"||str[i]>="A"&&str[i]<="Z"){
str2+="@"+str[i]+"@";
}else{
str2+=str[i]
}
if(n%5==0){
str2+="<br/>"//判断每五个一行
}
}
document.getElementById("pox").innerHTML=str2;
}
时间: 2024-10-06 14:01:35