js,下拉菜单
web前端-js教程
微信交友源码出售,ubuntu切换至桌面,梦到很多爬虫追你,php
,seo资料大全lzw
,seo资料大全lzw
function find_select(name)
{
var select = document.getElementsByName(name);
var find_str = document.getElementById('to_find_str').value;
if(select)
{
select = select[0];
var child = select.childNodes;
var can=false,text='',len=child.length,is_end=true;
for(var i=0;i<len;i++)
{
if(can)
{
text = child[i].text;
if( text &&
text.indexOf(find_str)!=-1)
{
//console.log(text);
child[i].selected = true;
var v = child[i].value;
select.value = v;
select.onchange(v);
is_end = false;
break;
}
}
if(child[i].selected)
can = true;
}
if(is_end)
alert('已没有匹配内容');
}
}