究竟是多么差的技术,打个表要17行代码
话说什么时候论坛多了个板(bushi我来试试水[贴吧_滑稽][贴吧_滑稽][贴吧_滑稽]
smcf.js开发日记
一个单行表格函数我写了17行,真的太屎山了[贴吧_滑稽][贴吧_滑稽][贴吧_滑稽]
不过能稳定运行,挺好[贴吧_滑稽]
代码( smcf.js库表格部分代码(未模块化) )
function table(str){
var black = "█";
var air = "";
var len = 0;
var len2 = 0;
var strlength = str.length;
while ( len2 <= strlength ){
black = black + "█";
len2 += 1;
}
while ( len < black.length - str.length - 2 ){
air = air + " ";
len += 1;
}
document.write("say " + black + "<br>");
document.write("say " + "█" + str + air + "█" + "<br>");
document.write("say " + black + "<br>");
return str;
}
真tm屎山(踩一脚 这年头还有人用var 夙S溯 发表于 2024-1-14 13:09
这年头还有人用var
用习惯了
页: [1]