有些信息在select里没有,想在select里直接输入,能不能模仿出这样一个组件出来达到这个目的?
解决方案 »
- struts2+jquery ajax做分页
- 关于jsf框架和ajax的一些问题
- 一个关于文本框的问题
- jsp页面 contentType="application/pdf;charset=gb2312"
- 为什么我的Hibernate能显示数据,但却不能执行save(),delete(),update方法??...急急急!!
- ajax二级联动
- 如果附件以blob的形式存在数据库中/怎么实现下载功能阿?
- 现金求购适用于县级国土局的系统(带源码)
- 急:求一JAVA程序(数据库是SQLSERVER,主要用途是要读出数据库的大二进制)
- 大家来讨论一个最实际的问题:)
- 请问如何得到虚拟目录的真实目录?
- jsp用session控制连接数这么做?
.sel_size{
FONT-SIZE : 14px;
FONT-STYLE : normal;
FONT-VARIANT : normal;
FONT-WEIGHT : normal;
LINE-HEIGHT : normal;
background-color : #fefefe;
}
input.smallInput {
border : 1 solid;
FONT-SIZE : 14px;
FONT-STYLE : normal;
FONT-VARIANT : normal;
FONT-WEIGHT : normal;
HEIGHT : 20px;
LINE-HEIGHT : normal;
background-color : #fefefe;
}
</style>
<select name="a" class="sel_size" onchange="setName()" style=" position:absolute;width:101px;height:20px;clip:rect(0,100,20,80)" >
<option value=""></option>
<option value="北京">北京</option>
<option value="天津">天津</option>
</select>
<input type="text" name="b" class="smallInput" style="position:relative;top:0px; width: 100px; height: 20px" >
<script>
function setName(){
document.all.b.value=document.all.a.value;
alert(document.all.b.value);
}
</script>
</script>
<select name="newtest">
<option value="1">测试1</option>
</select>在被提交页的地方加判断,
String testvalue="";
if(request.getParameter("test")!=null&&!request.getParameter("test").equals("")){
testvalue=request.getParameter("test");
}else if(request.getParameter("test")!=null&&!request.getParameter("test").equals("")){
testvalue=request.getParameter("newtest");
}
<input type="text" name="test">
<select name="newtest">
<option value="1">测试1</option>
</select>在被提交页的地方加判断,
String testvalue="";
if(request.getParameter("test")!=null&&!request.getParameter("test").equals("")){
testvalue=request.getParameter("test");
}else if(request.getParameter("newtest")!=null&&!request.getParameter("newtest").equals("")){
testvalue=request.getParameter("newtest");
}