js的StringBuffer类
2024-09-07 01:57:44
function StringBuffer(str)
{
var arr = [];
str = str || "";
arr.push(str);
this.append = function(str1)
{
arr.push(str1);
return this;
};
this.toString = function()
{
return arr.join("");
};
};
document.onreadystatechange = function(){
if(document.readyState == "complete")
{
var sb = new StringBuffer();
sb.append("Hello,").append("World");
alert(sb.toString());
}
};
最新文章
- 通过xib加载textfield的时候 发生 this class is not key value coding-compliant for the key textField. 情况怎么解决
- 五、python使用模块
- cocos2d-x简单动画
- WebService开发步骤
- cxSplitter.HotZone 怎么给分隔条增加值
- #include <;boost/asio.hpp>;
- 多项目中SVN权限管理精辟解析
- C语言程序内存布局
- Illegal invocation with document.querySelector [duplicate]
- mysql5.7 pxc
- h264_rtp打包解包类及实现demo
- 天了噜,Java 8 要停止维护了!
- python学习笔记九——序列
- Latex 三线表及设置列数
- Kafka.net使用编程入门(二)
- Web安全颜色
- Dubbo -- 系统学习 笔记 -- 配置
- jquey XMLHttpRequest cannot load url.Origin null is not allowed by Access-Control-Allow-Origin
- Java基础-MySQL数据库扫盲篇
- Effective C++(9) 构造函数调用virtual函数会发生什么