那可以選擇儲存幾個常用的省份或是資料嗎? 這應該是只要是組合框都可以用吧!
剛剛試了一下好用! 是组合框都可以用。 这个插件用的机会不大,就没有用配置。 平常我都是直接放在Maxthon的搜集面板内,需要的时候运行运行就行了,没有当成插件,免得还有占个位置,还可以通过同步在不同的计算机上使用。 使用搜集面板的方法: 打开搜集面板(快捷键Ctrl+G),新增一个标签,将下面的内容复制到标签中。需要时点击绿色的三角按钮即可。
可以修改var pharaoh_lastInput='重庆';赋一个初始值。
代码 <script language="JavaScript"> //By pharaoh.cnblogs.com //2008-2-18 V1.0.0
var pharaoh_lastInput='重庆'; for(var i=0;i<document.getElementsByTagName('SELECT').length;i++) { document.getElementsByTagName('SELECT')(i).oncontextmenu=function() { var select=event.srcElement; var find=false; var input=prompt('请输入搜索的文本:',pharaoh_lastInput); if(input) { pharaoh_lastInput=input.toLowerCase(); var sIndex=select.selectedIndex; for(var i=select.selectedIndex+1;i<select.options.length;i++) { var txt=select.options(i).innerText.toLowerCase(); if(txt.indexOf(pharaoh_lastInput)>=0) { select.selectedIndex = i; find=true; break; } } if(!find) { for(var i=0;i<=select.selectedIndex;i++) { var txt=select.options(i).innerText.toLowerCase(); if(txt.indexOf(pharaoh_lastInput)>=0) { select.selectedIndex = i; find=true; break; } } } } } }
</script> |