當前位置:成語大全網 - 漢語詞典 - m樹索引算法的Java實現

m樹索引算法的Java實現

& lt腳本語言= " JavaScript " & gt

var EFlag = 1;

功能鍵KeyDown(){

如果(!(event . shift key | | event . alt key)& amp;& ampkey code = = 13 & amp;& ampevent.ctrlKey){

document . form 1 . submit();

}

}

函數addcontent(str1,str2)

{

if(EFlag == 1)

{

form 1 . content . focus();

if((document . selection)& amp;& amp(document.selection.type== "Text "))

{

var range = document . selection . create range();

var ch _ text = range.text

range . text = str 1+ch _ text+str 2;

}

其他

{

document . form 1 . content . value = document . form 1 . content . value+str 1+str 2;

form 1 . content . focus();

}

}

else { insert html 2(str 1+str 2);返回;}

}

函數addcontent2(str){

document . form 1 . content . value+= str;

}

函數fontchuli(){

if((document . selection)& amp;& amp(document . selection . type = = " Text "){

var range = document . selection . create range();

var ch _ text = range.text

range . text = font begin+ch _ text+font end;

}

否則{

document . form 1 . content . value = font begin+document . form 1 . content . value+font end;

document . form 1 . content . focus()。

}

}

函數showsize(size){

font begin = "[size = "+size+"]";

font end = "[/size]";

font chuli();

}

函數showface(face){

font begin = "[face = "+face+"]";

font end = "[/face]";

font chuli();

}

函數showalign(align){

font begin = "[align = "+align+"]";

font end = "[/align]";

font chuli();

}

函數showcolor(color){

font begin = "[color = "+color+"]";

font end = "[/color]";

font chuli();

}

& lt/script & gt;