ASP、div中提交表单问题、求大神帮忙!看下面简单代码
求大神帮忙处理下!把这表单放在div内,点“搜”按钮、不跳转目标页面、<divid="sousuo"><formname="form1"method="post"acti...
求大神帮忙处理下!把这表单放在div内,点“搜”按钮、不跳转目标页面、
<div id="sousuo">
<form name="form1" method="post" action="sousou.asp">
<select name="select"style="height: 40; font-size:30px;">
<option value="成品" selected>成品</option>
<option value="辅料">辅料</option>
<option value="配件">配件</option>
<option value="毛胚">毛胚</option>
<option value="半成品">半成品</option>
<option value="成品">成品</option>
</select>
*实物编码搜<br>
<input type="text" name="key1" value=""size="10" style="height: 40; font-size:25px;"/>
<input type="submit" name="Submit" value="搜"style="height: 40; font-size:30px;">
</form>
</div>
#sousuo{
background-color: #CCFFCC;
width:240px;
border:1px solid #ddeecc;
height:auto;
}
求大神帮忙处理下! 展开
<div id="sousuo">
<form name="form1" method="post" action="sousou.asp">
<select name="select"style="height: 40; font-size:30px;">
<option value="成品" selected>成品</option>
<option value="辅料">辅料</option>
<option value="配件">配件</option>
<option value="毛胚">毛胚</option>
<option value="半成品">半成品</option>
<option value="成品">成品</option>
</select>
*实物编码搜<br>
<input type="text" name="key1" value=""size="10" style="height: 40; font-size:25px;"/>
<input type="submit" name="Submit" value="搜"style="height: 40; font-size:30px;">
</form>
</div>
#sousuo{
background-color: #CCFFCC;
width:240px;
border:1px solid #ddeecc;
height:auto;
}
求大神帮忙处理下! 展开
2个回答
展开全部
<div id="sousuo">
<form name="form1" method="post" action="sousou.asp">
<select name="select"style="height: 40; font-size:30px;">
<option value="成品" selected>成品</option>
<option value="辅料">辅料</option>
<option value="配件">配件</option>
<option value="毛胚">毛胚</option>
<option value="半成品">半成品</option>
<option value="成品">成品</option>
</select>
*实物编码搜<br>
<input type="text" name="key1" value=""size="10" style="height: 40; font-size:25px;"/>
<input type="button" onclick="btn_submit()" value="搜" style="height: 40; font-size:30px;">
</form>
</div>
<script>
function btn_submit(){
alert('123'); //其他函数 如正则匹配
form1.submit(); //form1是要提交的表单name
//表单中button的type改为button,添加点击事件
}
</script>
<style>#sousuo{background-color: #CCFFCC;width:240px;border:1px solid #ddeecc;height:auto;}</style>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询