JS

By 肖奈
2016-07-01
3412 read
//select选中提交
<script>   
       function submitForm1(){
//获取form表单对象   提交
    var form = document.getElementById("form1");
    form.submit();//form表单提交
}
</script>


<form action="z.jsp" method="post" accept-charset="gbk" name="form1" id="form1">               
             
                <select name="class" onChange="submitForm1()"> 
                <option >==请选择班级==</option>                
                 	<option value="<%=rrs.getString(2)%>"><%=rrs.getString(1)%></option> 						
                </select>		
          
          
            </span>
        </div>  </form>
//链接赋值
 <script>
						var str;
						function aa(){
						str=document.getElementById("isbn").value;//把文本框值赋值给变量str
						if(str=="")
						alert("ISBN为空");
						else
						location.href='jc.jsp?isbn='+str;
						//alert(str);
						}
						</script>


JSP
Action

Comments

暂无评论,还不快来坐沙发...

Leave a Reply