js客户端数据库的对象与函数

文章作者 100test 发表时间 2007:03:14 16:28:38
来源 100Test.Com百考试题网


有时候想在网页上使用客户端数据库,但为了兼容第版本的浏览器不支持xml技术,所以在此编了一些js的dml函数希望有兴趣的朋友一起讨论
function TRform()
{
this.TRRC=new Array().
this.QRC=new Array().//结果

this.currentRC=1.//当前纪录指针
this.lastRC=0.//最后纪录
this.RClength=arguments.length.//字段数

this.TRRC[0]=new Array().//字段名

for(i=0.i
this.addRC=addRC. //加一条纪录
this.showRC=showRC.//打印当前纪录
this.showPrevious=showPrevious.
this.showNext=showNext.

this.preLoad=preLoad. //预装载图像
this.item2index=item2index.//使字段名到数组的索引
this.showThis=showThis.
this.Isright=Isright.
this.seek=seek.


}

function addRC()
{
this.TRRC[ this.lastRC]=new Array().
for(i=0.i
return true.

}



function showRC(){
for(rc=0.rc {
theEL=eval(this.QRC[0][rc]).

if(this.QRC[0][rc].indexOf("image")==-1){
theEL.innerText=this.QRC[this.currentRC][rc]
}
else{
theEL.src=this.QRC[this.currentRC][rc].
}
}
return true.

}

function showNext(){
this.seek("all","all")
if( this.currentRC>this.lastRC) this.currentRC=this.lastRC.
this.showRC().


}

相关文章


JavaScript中的正则表达式(1)
JavaScript中的正则表达式(2)
js客户端数据库的对象与函数
国内不谈Java--硅谷有感
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛