select 和 text的集成 http://community.csdn.net/Expert/topic/3536/3536313.xml?temp=.2880976回复人: BILLSJONE(BILL_JONE) ( ) 信誉:93 2004-11-9 16:31:07 得分: 0 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script LANGUAGE="JavaScript">function jin_e(){ var index=-1; var kx; var temp; kx=document.form1.text1.value; for(var i=0;i<document.form1.select1.options.length;i++) { if(document.form1.select1.options[i].text==kx) index=i; } if(index>=0)document.form1.select1.options[index].selected=true;}</script><form name="form1"><input type=text name=text1 style="width:100px;" value="" onPropertyChange="return jin_e();"><select name="select1" style="margin-left:100px;width:118px;"> <option value=1 selected>abc</option> <option value=2>a</option> <option value=3>acde</option> <option value=4>achh</option></select></form>见:http://community.csdn.net/Expert/topic/3544/3544733.xml?temp=.5064661 <script LANGUAGE="JavaScript">function followMe(obj){ var selObj=document.form1.select1 for(var i=0;i<selObj.options.length;i++){ if(selObj.options[i].text.indexOf(obj.value)==0){ selObj.selectedIndex=i return } } }</script><form name="form1"><input type=text name=text1 onPropertyChange="followMe(this)"><select name="select1" multiple > <option value=1>a</option> <option value=2>ab</option> <option value=3>abc</option> <option value=4>bc</option></select></form> 关于jQuery单选框跨页传值问题 jqeuery easyui datagrid中appendRow新的一行,如何从后台传数据? 提取html标签 表单控件如何扩展问题 ? 请问一下我后面的数据如何写入数据库列 一个简单问题 用js能上船文件么? 请问js怎么判断中英文啊? 请问给位高手怎样可以在JavaScript中实现导出的功能 (心急人上) 错在哪里??? 一个下拉框,三个文本框... 三层菜单的代码。
function jin_e()
{
var index=-1;
var kx;
var temp;
kx=document.form1.text1.value;
for(var i=0;i<document.form1.select1.options.length;i++)
{
if(document.form1.select1.options[i].text==kx)
index=i;
}
if(index>=0)document.form1.select1.options[index].selected=true;
}
</script>
<form name="form1">
<input type=text name=text1 style="width:100px;" value="" onPropertyChange="return jin_e();">
<select name="select1" style="margin-left:100px;width:118px;">
<option value=1 selected>abc</option>
<option value=2>a</option>
<option value=3>acde</option>
<option value=4>achh</option>
</select>
</form>
见:http://community.csdn.net/Expert/topic/3544/3544733.xml?temp=.5064661
function followMe(obj)
{
var selObj=document.form1.select1
for(var i=0;i<selObj.options.length;i++){
if(selObj.options[i].text.indexOf(obj.value)==0){
selObj.selectedIndex=i
return
}
}
}
</script>
<form name="form1">
<input type=text name=text1 onPropertyChange="followMe(this)">
<select name="select1" multiple >
<option value=1>a</option>
<option value=2>ab</option>
<option value=3>abc</option>
<option value=4>bc</option>
</select>
</form>