无为清净楼资源网 Design By www.qnjia.com
tableSort.class.js
复制代码 代码如下:
/*
* 表格名不能为空,可为已获取的对象或名字
* 表头名默认为:tag
* 通过自行编写接口可实现不同的触发排序方式
*
* 作者:Auntion
* E-mail:Auntion@Gmail.com
* OICQ:82874972
*
* 日期:2007年04月22日 - 测试 - 待修正
*/
var tableSort= function(element,tagName,upStyle,downStyle){this.table= (typeof(element) == 'string') ? TAGDom.fromId(element) : element;this.td = this.table.getElementsByTagName("td"); this.hName= (tagName.length<1) ? "tag" : tagName;this.rows = this.table.rows;this.byUp = (upStyle == undefined) ? "DescUp" : upStyle ;this.byDown = (downStyle == undefined) ? "DescDown" : downStyle ;var totalTd = [];var totalNr = [];var totalTag= [];this.tempCellIndex; this.tempStatus = {};var setAllTag = function(){ for(var i = 0; i < this.td.length; i++){if(this.td[i].className === this.hName) totalTag.push(this.td[i]);}}.bind(this);var getStatus = function(tagName){this.tempStatus[tagName] = (this.tempStatus[tagName] == true) ? false : true;for(tags in this.tempStatus){if(tags == tagName) return this.tempStatus[tags];else delete this.tempStatus[tags];}}.bind(this);var changeShow = function(cellIn,status){for(var i=0; i<totalTag.length; i++){if(totalTag[i].cellIndex == cellIn){if(status == true) totalTag[i].className = this.byUp;else if(status == false) totalTag[i].className = this.byDown;}else{totalTag[i].className = this.hName;}}}.bind(this);var startSort = function(status){for (var i = totalNr[this.tempCellIndex].length - 1; i > 0; i--){for (var j = 0; j < i; ++j){if ( (status == true) ? totalNr[this.tempCellIndex][j] > totalNr[this.tempCellIndex][j + 1] : totalNr[this.tempCellIndex][j] < totalNr[this.tempCellIndex][j + 1] ){var temp = totalNr[this.tempCellIndex][j + 1];totalNr[this.tempCellIndex][j + 1] = totalNr[this.tempCellIndex][j];totalNr[this.tempCellIndex][j] = temp;for(var n=0; n<totalNr.length; n++){if(n != this.tempCellIndex){var temps = totalNr[n][j+1];totalNr[n][j + 1] = totalNr[n][j];totalNr[n][j] = temps;}}}}};InsertContect();}.bind(this);var InsertContect = function(){ for(var i=0; i<totalTd.length; i++){for(var j=0; j<totalTd[i].length; j++){totalTd[i][j].innerHTML = totalNr[i][j];}};totalTd.length = 0;totalNr.length = 0;};this.init = function(status){for(var i=0; i<(this.td.length/this.rows.length); i++){totalTd[i] = new Array();totalNr[i] = new Array();for(var j=0; j<this.rows.length; j++){if(this.rows[j].cells[i].className !== this.hName){totalTd[i][j-1] = this.rows[j].cells[i];if(IsNumber(this.rows[j].cells[i].innerHTML) == true){totalNr[i][j-1] = parseInt(this.rows[j].cells[i].innerHTML);}else{totalNr[i][j-1] = this.rows[j].cells[i].innerHTML;}}}}startSort(status);}
/********************************************************************************************************************************/
/**通过点击标签触发排序事件**/
//public: 通过默认鼠标事键触发 (interface example)(设置用户接口的范例)
this.toTagStart = function(){
setAllTag(); //获取标签
for(var i=0; i<totalTag.length; i++){
totalTag[i].sIndex = function(cIndex){ this.tempCellIndex=cIndex }.bind(this); //设置列index
totalTag[i].gStatus = function(values){ return getStatus(values) }; //获取与设置状态
totalTag[i].ceShow = function(i,s){ changeShow(i,s) }; //改变显示的东西
totalTag[i].stSort = function(status){ this.init(status) }.bind(this); //初始化
totalTag[i].onselectstart = function(){ return false }; //点击不选中文字
totalTag[i].onclick = function(){
this.sIndex(this.cellIndex);
this.status = this.gStatus(this.firstChild.nodeValue);
this.ceShow(this.cellIndex,this.status);
this.stSort(this.status);
}
}
}
}
Language.ext.js
复制代码 代码如下:
/*
*
By Auntion
QQ:82874972
Blog:Auntion@blogbus.com
Email:Auntion@Gmail.com
请勿删除此部分注释.谢谢!
ver date-2007-02-01
*
*/
var isIe = /msie/i.test(navigator.userAgent);
var TAGDom = {
fromId: function(i){
return document.getElementById(i);
},
fromName: function(i){
return document.getElementById(i);
},
fromClass: function(className,baseId) {
this.fatherId = null;
if(!baseId){
this.fatherId = document;
}else{
this.fatherId = DOM.fromId(baseId);
}
var basic = fatherId.getElementsByTagName("*") || document.all;
var child = null;
var classNames = null;
var aggregate = [];
for (var i = 0; i < basic.length; i++) {
child = basic[i];
classNames = child.className.split(" ");
for (var j = 0; j < classNames.length; j++) {
if (classNames[j] == className) {
aggregate.push(child);
break;
}
}
}
return aggregate;
}
};
function externalStyle (element, target) {
this.setReturn;
if (element.currentStyle){
this.setReturn = element.currentStyle[target];
}else if (window.getComputedStyle){
this.setReturn = getComputedStyle (element,"").getPropertyValue(target);
}
return this.setReturn;
}
String.prototype.toInt = function(){
return parseInt(this.replace(/[a-zA-Z]+/,''));
}
String.prototype.trim = function(){
return this.replace(/(^\s*)|(\s*$)/g, "");
}
Function.prototype.bind = function(e) {
var source = this;
return function() {
return source.apply(e,arguments);
}
}
function IsNumber(_str){
var tmp_str = _str.trim();
var pattern = /^(- ¦\+)?\d+(\d+)?$/;
return pattern.test(tmp_str);
}
使用实例_1.htm
12下一页阅读全文
复制代码 代码如下:
/*
* 表格名不能为空,可为已获取的对象或名字
* 表头名默认为:tag
* 通过自行编写接口可实现不同的触发排序方式
*
* 作者:Auntion
* E-mail:Auntion@Gmail.com
* OICQ:82874972
*
* 日期:2007年04月22日 - 测试 - 待修正
*/
var tableSort= function(element,tagName,upStyle,downStyle){this.table= (typeof(element) == 'string') ? TAGDom.fromId(element) : element;this.td = this.table.getElementsByTagName("td"); this.hName= (tagName.length<1) ? "tag" : tagName;this.rows = this.table.rows;this.byUp = (upStyle == undefined) ? "DescUp" : upStyle ;this.byDown = (downStyle == undefined) ? "DescDown" : downStyle ;var totalTd = [];var totalNr = [];var totalTag= [];this.tempCellIndex; this.tempStatus = {};var setAllTag = function(){ for(var i = 0; i < this.td.length; i++){if(this.td[i].className === this.hName) totalTag.push(this.td[i]);}}.bind(this);var getStatus = function(tagName){this.tempStatus[tagName] = (this.tempStatus[tagName] == true) ? false : true;for(tags in this.tempStatus){if(tags == tagName) return this.tempStatus[tags];else delete this.tempStatus[tags];}}.bind(this);var changeShow = function(cellIn,status){for(var i=0; i<totalTag.length; i++){if(totalTag[i].cellIndex == cellIn){if(status == true) totalTag[i].className = this.byUp;else if(status == false) totalTag[i].className = this.byDown;}else{totalTag[i].className = this.hName;}}}.bind(this);var startSort = function(status){for (var i = totalNr[this.tempCellIndex].length - 1; i > 0; i--){for (var j = 0; j < i; ++j){if ( (status == true) ? totalNr[this.tempCellIndex][j] > totalNr[this.tempCellIndex][j + 1] : totalNr[this.tempCellIndex][j] < totalNr[this.tempCellIndex][j + 1] ){var temp = totalNr[this.tempCellIndex][j + 1];totalNr[this.tempCellIndex][j + 1] = totalNr[this.tempCellIndex][j];totalNr[this.tempCellIndex][j] = temp;for(var n=0; n<totalNr.length; n++){if(n != this.tempCellIndex){var temps = totalNr[n][j+1];totalNr[n][j + 1] = totalNr[n][j];totalNr[n][j] = temps;}}}}};InsertContect();}.bind(this);var InsertContect = function(){ for(var i=0; i<totalTd.length; i++){for(var j=0; j<totalTd[i].length; j++){totalTd[i][j].innerHTML = totalNr[i][j];}};totalTd.length = 0;totalNr.length = 0;};this.init = function(status){for(var i=0; i<(this.td.length/this.rows.length); i++){totalTd[i] = new Array();totalNr[i] = new Array();for(var j=0; j<this.rows.length; j++){if(this.rows[j].cells[i].className !== this.hName){totalTd[i][j-1] = this.rows[j].cells[i];if(IsNumber(this.rows[j].cells[i].innerHTML) == true){totalNr[i][j-1] = parseInt(this.rows[j].cells[i].innerHTML);}else{totalNr[i][j-1] = this.rows[j].cells[i].innerHTML;}}}}startSort(status);}
/********************************************************************************************************************************/
/**通过点击标签触发排序事件**/
//public: 通过默认鼠标事键触发 (interface example)(设置用户接口的范例)
this.toTagStart = function(){
setAllTag(); //获取标签
for(var i=0; i<totalTag.length; i++){
totalTag[i].sIndex = function(cIndex){ this.tempCellIndex=cIndex }.bind(this); //设置列index
totalTag[i].gStatus = function(values){ return getStatus(values) }; //获取与设置状态
totalTag[i].ceShow = function(i,s){ changeShow(i,s) }; //改变显示的东西
totalTag[i].stSort = function(status){ this.init(status) }.bind(this); //初始化
totalTag[i].onselectstart = function(){ return false }; //点击不选中文字
totalTag[i].onclick = function(){
this.sIndex(this.cellIndex);
this.status = this.gStatus(this.firstChild.nodeValue);
this.ceShow(this.cellIndex,this.status);
this.stSort(this.status);
}
}
}
}
Language.ext.js
复制代码 代码如下:
/*
*
By Auntion
QQ:82874972
Blog:Auntion@blogbus.com
Email:Auntion@Gmail.com
请勿删除此部分注释.谢谢!
ver date-2007-02-01
*
*/
var isIe = /msie/i.test(navigator.userAgent);
var TAGDom = {
fromId: function(i){
return document.getElementById(i);
},
fromName: function(i){
return document.getElementById(i);
},
fromClass: function(className,baseId) {
this.fatherId = null;
if(!baseId){
this.fatherId = document;
}else{
this.fatherId = DOM.fromId(baseId);
}
var basic = fatherId.getElementsByTagName("*") || document.all;
var child = null;
var classNames = null;
var aggregate = [];
for (var i = 0; i < basic.length; i++) {
child = basic[i];
classNames = child.className.split(" ");
for (var j = 0; j < classNames.length; j++) {
if (classNames[j] == className) {
aggregate.push(child);
break;
}
}
}
return aggregate;
}
};
function externalStyle (element, target) {
this.setReturn;
if (element.currentStyle){
this.setReturn = element.currentStyle[target];
}else if (window.getComputedStyle){
this.setReturn = getComputedStyle (element,"").getPropertyValue(target);
}
return this.setReturn;
}
String.prototype.toInt = function(){
return parseInt(this.replace(/[a-zA-Z]+/,''));
}
String.prototype.trim = function(){
return this.replace(/(^\s*)|(\s*$)/g, "");
}
Function.prototype.bind = function(e) {
var source = this;
return function() {
return source.apply(e,arguments);
}
}
function IsNumber(_str){
var tmp_str = _str.trim();
var pattern = /^(- ¦\+)?\d+(\d+)?$/;
return pattern.test(tmp_str);
}
使用实例_1.htm
12下一页阅读全文
无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新日志
2024年11月16日
2024年11月16日
- 群星《歌手2024 第13期》[FLAC/分轨][325.93MB]
- 阿木乃《爱情买卖》DTS-ES【NRG镜像】
- 江蕾《爱是这样甜》DTS-WAV
- VA-Hair(OriginalBroadwayCastRecording)(1968)(PBTHAL24-96FLAC)
- 博主分享《美末2RE》PS5 Pro运行画面 玩家仍不买账
- 《双城之战2》超多新歌MV发布:林肯公园再次献声
- 群星《说唱梦工厂 第11期》[320K/MP3][63.25MB]
- 群星《说唱梦工厂 第11期》[FLAC/分轨][343.07MB]
- 群星《闪光的夏天 第5期》[320K/MP3][79.35MB]
- 秀兰玛雅.1999-友情人【大旗】【WAV+CUE】
- 小米.2020-我想在城市里当一个乡下人【滚石】【FLAC分轨】
- 齐豫.2003-THE.UNHEARD.OF.CHYI.3CD【苏活音乐】【WAV+CUE】
- 黄乙玲1986-讲什么山盟海誓[日本东芝版][WAV+CUE]
- 曾庆瑜1991-柔情陷阱[台湾派森东芝版][WAV+CUE]
- 陈建江《享受男声》DTS-ES6.1【WAV】