备忘一下自己的书写风格,并努力在以后书写时保持风格的一致性。
css:
/* 整体文件作用说明 */
@charset "utf-8";
/**
* XXX.inc (C) http://www.XXX.com.cn
* by: TRS bwl
* since: 2008-08-25 13:44
*/
* {font-family: "宋体";font-size:12px;padding:0px;margin:0px;}
/* 更多样式定义,将样式分为几类,并且每类之前增加说明 */
js:
/** * 通用确认框架 * * @author TRS bwl(***@gmail.com) * @since 2008-08-25 13:46 */ // --------------------------------------------------------- if (typeof $ == "undefined") { var $ = function(sid) { if (typeof sid == "string") { return document.getElementById(sid); } return sid; }; } //----------- 封装stringBuffer对象,可以节省字符串拼接的开销 ----------- function xStringBuffer() { this._strings_ = new Array(); } xStringBuffer.prototype.append = function (str) { this._strings_.push(str); }; xStringBuffer.prototype.toString = function () { var str = this._strings_.join(""); delete this._strings_; this._strings_ = new Array(); return str; }; /* 更多实现。。。 */