//基本object方法
putmethods(methodlist, obj,"constructor,hasownproperty,isprototypeof,propertyisenumerable,tolocalestring,tostring,valueof");
//基本array方法
putmethods(methodlist, obj,"concat,join,length,pop,push,reverse,shift,slice,sort,splice,unshift");
//基本date方法
putmethods(methodlist,obj,"getdate,getutcdate,getday,getutcday,getfullyear,getutcfullyear,gethours,getutchours,getmilliseconds,getutcmilliseconds,getminutes,getutcminutes,getmonth,getutcmonth,getseconds,getutcseconds,gettime,gettimezoneoffset,getyear");
putmethods(methodlist,obj,"setdate,setutcdate,setfullyear,setutcfullyear,sethours,setutchours,setmilliseconds,setutcmilliseconds,setminutes,setutcminutes,setmonth,setutcmonth,setseconds,setutcseconds,settime,setyear,todatestring,togmtstring,tolocaledatestring,tolocaletimestring,tostring,totimestring,toutcstring,valueof,parse,utc");
//基本math方法
putmethods(methodlist,obj,"e,ln10,ln2,log10e,log2e,pi,sqrt1_2,sqrt2");
putmethods(methodlist,obj,"abs,acos,asin,atan,atan2,ceil,cos,exp,floor,log,max,min,pow,random,round,sin,sqrt,tan");
//基本function方法
putmethods(methodlist,obj,"arguments,caller,length,prototype,apply,call,tostring");
//基本number方法
putmethods(methodlist,obj,"max_value,min_value,nan,negative_infinity,positive_infinity");
putmethods(methodlist,obj,"tostring,tolocalstring,tofixed,toexponential,toprecision");
//基本regexp方法
putmethods(methodlist,obj,"global,ignorecase,lastindex,multiline,source,exec,test");
//基本string方法
putmethods(methodlist,obj,"charat,charcodeat,contact,indexof,lastindexof,match,replace,search,slice,split,substring,substr,tolowercase,tostring,touppercase,valueof,fromcharcode");
putmethods(methodlist,obj,"anchor,big,blink,bold,fixed,fontcolor,fontsize,italics,link,small,strike,sub,sup");
}
for (each in obj)
{
methodlist.pushdistinct(each);
}
methodlist.sort();
if (methodlist.length > 0)
{
methods.options.length = 0;
for (var i = 0; i < methodlist.length; i++)
{
methods.options.add(new option(methodlist[i]));
}
if (methods.options.length > 10)
{
methods.size = 10;
}
else
{
methods.size = methods.options.length;
}
methods.style.top = osel.offsettop;
methods.style.left = osel.offsetleft;
methods.style.display = "";
methods.options[0].selected = true;
methods.focus();
}
}
catch(e){}
}
function selectmethod()
{
var src = event.srcelement;
if(event.keycode == 13)
{
selmethod(src);
}
if(event.keycode == 27 || event.keycode == 8 || event.keycode == 32)
{
src.style.display = "none";
editbox.focus();
}
}
function selmethod(src)
{
clipboarddata.setdata('text',src.options[src.selectedindex].text);
editbox.focus();
editbox.document.execcommand('paste');
src.style.display = "none";
getcursorposition();
}
function getpos(text) //计算行数、列数
{
var rows = 1;
var cols = 1;
var idx = 0;
var subtext = text;
while((idx = subtext.indexof("\n")) != -1)
{
subtext = subtext.substring(idx + 1);
rows++;
}
return new array(rows, subtext.length + 1);
}
function getnullrows(src,osel) //计算空行
{
var rows = 0;
var offsetend = src.document.selection.createrange();