在线等。。。!如何实现文本框与下拉菜单的结合?? 去www.php.net的function查询里面学习 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script language="javascript"> function add(val) { var all = document.getElementById("n"); var max = all.options.length; for (var i=0;i<max;i++) { if (all.options[i].text==val) { return; } } all.options.add(new Option(val)); }</script><form name="form1"><input type="text" size="20" name="m" value="hello" onPaste="alert('请手工输入');return false" onBlur="add(this.value)" ><select name="n" onChange="this.form.m.value=this.options[selectedIndex].text" id="n"><option>hello</option><option>a</option></select></form> 下面是去掉空格<script language="javascript"> function add(val) { var all = document.getElementById("n"); var max = all.options.length; if(val.replace(/(\s+)/,'')==''){ return; } for (var i=0;i<max;i++) { if (all.options[i].text==val) { return; } } all.options.add(new Option(val)); }</script><form name="form1"><input type="text" size="20" name="m" value="hello" onPaste="alert('请手工输入');return false" onBlur="add(this.value)" ><select name="n" onChange="this.form.m.value=this.options[selectedIndex].text" id="n"><option>hello</option><option>a</option></select></form> 这段asp怎么写成php的 php update失败 用的mysql数据库 关于FCKedit编辑器上传图片的问题(急) php能做成这种服务端吗?如果可以,有C/C++基础自学大概要多久才行? PHP的弱弱问题。。。 PHP如何实现最简单的访问记录(记录IP及时间) 在mysql语句中可以使用#注释,是pma的功能还是mysql的功能? 两个页面之间传递变量值 新手求助bbs论坛显示问题!!!!!!!!!! 如何发现出错代码及错误 信息!急!!!!!! 三种代码格式哪种写法更好? 毕业设计不知道做什么好,郁闷ing~~~~
function add(val) {
var all = document.getElementById("n");
var max = all.options.length;
for (var i=0;i<max;i++) {
if (all.options[i].text==val) {
return;
}
}
all.options.add(new Option(val));
}
</script>
<form name="form1">
<input type="text" size="20" name="m" value="hello" onPaste="alert('请手工输入');return false" onBlur="add(this.value)" >
<select name="n" onChange="this.form.m.value=this.options[selectedIndex].text" id="n">
<option>hello</option>
<option>a</option>
</select>
</form>
function add(val) {
var all = document.getElementById("n");
var max = all.options.length;
if(val.replace(/(\s+)/,'')==''){
return;
}
for (var i=0;i<max;i++) {
if (all.options[i].text==val) {
return;
}
}
all.options.add(new Option(val));
}
</script>
<form name="form1">
<input type="text" size="20" name="m" value="hello" onPaste="alert('请手工输入');return false" onBlur="add(this.value)" >
<select name="n" onChange="this.form.m.value=this.options[selectedIndex].text" id="n">
<option>hello</option>
<option>a</option>
</select>
</form>