- js的方法是覆盖的,后面声明的会覆盖前面的。无论在js文件还是html文件
- 对象的声明方法:
- function comet_message() {
- this.id = "";
- this.parentid = "";
- this.action = "";
- this.tr = "";
- }
- 方法的声明:
- function applyMessageContent(data, table_id) {
- var arr = data.split("@_@");
- var order = new comet_message();
- order.id = arr[0].replace("/r/n", "");
- order.parentid = arr[1];
- order.action = arr[2];
- order.tr = arr[3];
- process(order, data, table_id);
- return order;
- }