jspµÄת»»form action java´úÂë
ÕâÖÖÒ³Ã淽ʽÈçºÎÔÚstrutsÀïʵÏÖ
<form id="form1" name="form1" method="post" action="a.jsp" >
<% String myscore = request.getParameter("score");%>
<table width="950" height="574" border="1">
<tr>
<td colspan="2"> <p>
<label>score
<select name="score">
<option value="20" <%= null != myscore && myscore.equals("20") ? " selected" :"" %>>
20 </option>
<option value="30" <%=null != myscore&& myscore.equals("30")?"selected":""%>>
30 </option>
<option value="40" <%=null != myscore &&myscore.equals("40")?"selected":""%>>
40 </option>
<option value="50" <%=null != myscore &&myscore.equals("50")?"selected":""%>>
50 </option>
<option value="60" <%=null != myscore &&myscore.equals("60")?"selected":&
Ïà¹ØÎÊ´ð£º
ÎÒµãºóÍËʱÊÇ¿Õ°×Ò³Ãæ
ÐèˢвÅÄÜÏÔʾ
Õâ¸öÔõô´¦Àí°¡
Çë´ó¼Ò°ï°ïæ
°ÑÎÊÌâ˵µÄÏêϸһЩ£¬ÕâÑùÓÐÖúÓÚÎÊÌâµÄ»Ø¸´£¬¼°´ð°¸µÄ׼ȷÐÔ£¡
ÎÒ¾õµÃÊÇÄãµÄä¯ÀÀÆ÷Æ÷µÄÎÊÌâ°É£¬ÎÒÒÔÇ°Óöµ½¹ýÕâÑùµÄÎÊÌ⣬°ÑIEµÄËùÓÐÊôÐÔÖ ......
±¾ÈË×öÁËÒ»¸öÄ£Ä⹺ÎïÍøÕ¾£¬Óöµ½Ò»Ð©ÎÊÌâ¡£
µÚÒ»¸öÓû§Ñ¡ÔñÁËA¡¢B¡¢CÉÌÆ·
È»ºóµÚ¶þ¸öÓû§Ö»Ñ¡ÔñDÉÌÆ·¡£
µã»÷²é¿´µÄʱºò£¬¹ºÎï³µÁгöA¡¢B¡¢C¡¢DËÄÖÖÉÌÆ·£¬ÇëÎÊÄÄÀï³öÁËÎÊÌ⣿
Java code:
<%@ page content ......
<%@page language="java" contentType="text/html;charset=gb2312" import="java.sql.*"%>
<jsp:useBean id="db" class="wang.connectDB"/>
< ......
Óм¸ÖÖÓû§£¬ÆäȨÏÞ²»Í¬¡£Ö»ÓÐÌض¨È¨ÏÞµÄÓû§²ÅÄܽøÐÐÏàÓ¦²Ù×÷¡£ÎÒÏëÔÚjspÒ³ÃæÀï½øÐÐÕâ¸öÉèÖÃ
<input type="submit" value="ÐÞ¸Ä"/> ,ÎÒÏëÈÃÖ»ÓÐÌض¨È¨ÏÞµÄÓû§²ÅÄÜ°´Õâ¸ö°´Å¥£¬·ñÔò±¨ ......
ÎÒÏë×ö¹»¹ºÎï³µÓÃsession µ«ÊDz»ÖªµÀÔõô»ñÈ¡¹ºÂòÊýÁ¿ ËÓоßÌåµÄ´úÂëÂð Ï£ÍûÄܸîÉá
ÏÂÃæÊǹºÎï³µµÄºËÐÄ´úÂë
ÓÐÁËÕâ¸ö ¾ÍÓ¦¸ÃÄܹ»×ö³öÀ´°É
Java code:
public void doPost(HttpServletRequest reque ......