JavaScriptµÄ¹ØÓÚoption²Ù×÷µÄÎÊÌâ - Java / Web ¿ª·¢
JScript code:
<Html>
<Script>
function createOptions(){
var option = new Option(document.form1.select1.value)
document.form1.select2.options[2] = option
}
</script>
<form name=form1>
<select name=select1 size=10>
<option>¿ÉÑ¡ÔñÏîÄ¿
<option>---------------
<option value=Ï㽶>Ï㽶
<option value=°Å樂>°Å樂
<option value=蘋¹û>蘋¹û
<option value=Àæ×Ó>Àæ×Ó
</select>
<input type=button value="-->" onClick=createOptions()>
<select name=select2 size=10>
<option>Ñ¡ÔñÏîÄ¿
<option>---------------
</select></form>
</Body>
</Html>
ÎÊÌâÊÇÕâÑùµÄ£¬Õâ¶Î´úÂëʵÏÖ´Óselect1ÀïÃæÑ¡ÔñÒ»¸öoption·Åµ½select2ÀïÃ棬ÎÒÏëʵÏÖ¶àÏîÑ¡Ôñ²¢ÇÒÅжÏselect2ÀïÓÐûÓжÔÓ¦ÏûÓеĻ°Ôö¼ÓÓеĻ°Ìáʾ¡£ÔõôʵÏÖ£¿
select1ÖеÄÏîÐèÒªÇå³ýÂð£¿
Çå³ýÁËÒ²¿ÉÒÔ
лл¥ÉÏ Ñ§Ï°ÁË ÓÐʲôºÃµÄ×ÊÁÏ¿ÉÒÔÈÃÎÒϵͳµØѧһÏÂÂð
JS£º
JScript code:
<script type="text/javascript">
function changeOptions(){
var fruit1 = document.all.fruit1;
var fruit2 = document.all.fruit2;
for(var i=0; i<fruit1.options.le
Ïà¹ØÎÊ´ð£º
ÔÚaspÀïÔõôµ÷ÓÃjavaдµÄwebservice·½·¨£¬Óкܶ෽·¨
- <message name="RtPnrIn">
<part name="bstrPnrNO" type="s:string" />
<part name ......
JSPÒ³ÃæÖÐÓжà¸öradio°´Å¥
JSPÒ³Ã潫²ÎÊýPOST¸øservlet
ÒªÇóÈçÏÂ;
1.Ñ¡ÔñÒ»¸öradio£¬µ÷ÓÃservlet servletÖиù¾Ý²ÎÊýµ÷ÓÃÆäËû½Ó¿Ú£¬³ý·ÇÑ¡ÖиÃradio²¢µã»÷JSPÖеÄʵР......
×î½üÒ»¸öÏîÄ¿ÖÐÓöµ½Ò»¸öÎÊÌ⣺ÔÚÔÓеÄÒ»Ì×ϵͳÖÐ(php¿ª·¢)Ìí¼ÓһЩС¹¦ÄÜ(jsp¿ª·¢)£¬ÔÀ´Óû§ÏµÍ³¶¼ÊÇphp¿ª·¢µÄ£¬ÎÒÈçºÎÔÚjsp¿ª·¢µÄ¹¦ÄÜÖÐ×öµ½Óû§ÐÅÏ¢sessionͬ²½ÄØ£¿ ÓÐÈËÊÇ·ñÓÐ×ö¹ýÀàÒÔÏîÄ¿£¬ÏëÌýÌý´ó¼ÒµÄ¿´·¨
......
ÔÚJSPÒ³ÃæÓÐÒ»¸ö<input type="hidden" name="index" value="0">/>¿Ø¼þ
µ±ÎÒÓÃÏÂÃæµÄJavaScriptº¯Êý¸Ä±äÆävalueµÄÖµµÄʱºò Èç¹ûÂú×ãÌõ¼þ£¨¼´i>=3µÄʱºò£©ÎªÊ²Ã´valueµÄ ......
´ó¼ÒºÃ£¬ÎÒÔÚJSPµÄ³õѧÕߣ¬ÔÚ±à³ÌÖÐÓöµ½ÁËÒ»¸öÎÊÌ⣺
<jsp:useBean id="accountBiz" class="bank.AccountBiz"
scope="application">
Õâ¸ö±êÇ©ÖÐapplicationºÍsessi ......