JSPµ÷Óò»µ½jsÖеķ½·¨
ÈçÌ⣬ºÜÆæ¹Ö£¬°ÑJSÖеķ½·¨Äõ½Ò³ÃæÉÏÀ´¾Í¿ÉÒÔ£¬·Åµ½JSÖÐÈ¥¾Í²»¿ÉÒÔ£¬ÒýÓÃJS·¾¶ÊǾø¶ÔÕýÈ·µÄ£¬Ð»´ó¼Ò°ïæ½âÃÔ!
·¾¶¾ø¶ÔÊÇ´íµÄ...
<script language="JavaScript" src="/website/js/prototype.js" type="text/JavaScript"> </script>
¿´¿´ÄãµÄJS·¾¶Ð´µÄÊǾø¶Ô·¾¶»¹ÊÇÏà¶Ô·¾¶£¿
¾ø¶ÔÊÇ·¾¶ÎÊÌâ
<script language= "JavaScript " src= " <%=request.getContextPath()%>
/website/js/prototype.js " type= "text/JavaScript "> </script>
ty
·¾¶ÊǾø¶ÔÕýÈ·µÄ
°ÑÄǸö·½·¨·Åµ½ÁíÍâÒ»¸öJSÖоͿÉÒÔ
<script type="text/javascript" src="js/oa_file.js">
</script>
·¾¶´íÎóÊǿ϶¨µÄ
ÄãµÄÄǸöjsÎļþÀïÃæ¿ÉÄÜÓÐÒ»¸öµØ·½ÊÇ´íÎóµÄ, ÒѾ·¢ÉúÁË´íÎó¾Í²»Ö´Ðз½·¨ÁË.
(·Ç·½·¨´íÎó, ÕÒ²»ÊÇ·½·¨µÄµØ·½µÄ´íÎó)
ÔÙ˵·¾¶ÕýÈ·ÎÒÏ÷Äã... Äã¿´Çå³þÏà¶Ô·¾¶Õýȷô ·½·¨µ÷Óõĵ½Ã´? ÄÄÅÂÊÇÔÚÄǸöJSÀïalertÌõÐÅÏ¢¸æËßÄãµ¼Èë³É¹¦ÁËÄØ
ÎÒ¶¼ËµÁË°ÑͬÑùÒ»¸ö·½·¨·Åµ½ÁíÍâÒ»¸öͬĿ¼ÏµÄJSÖоͿÉÒÔ(²»»áÊÇ·¾¶ÎÊÌâ)£¬JSÖÐÒ²²»¿ÉÄÜÓдúÂëд´íµÄ£¬ÒòΪÎÒÒѾ°ÑËü¸Ä³
Ïà¹ØÎÊ´ð£º
¸÷λÀÏ´óºÃ¡£¡£¡£Ð¡µÜÓÐÒ»¸öÂÒÂëÎÊÌâ¼±Ðè°ïæ½â¾ö
ÎÒÔÚ±¾Ò³ÖÐÓÃrequest.getParameter("name")È¡±äÁ¿¡£¡£±äÁ¿µÄ¸³ÖµÎªºº×Ö¡£ÎÒÔÚÒ³ÃæµÄ¿ªÍ·¼ÓÁË<%@ page language = "java" contentType=&quo ......
´ó¼ÒºÃ£¬ÎÒÔÚJSPµÄ³õѧÕߣ¬ÔÚ±à³ÌÖÐÓöµ½ÁËÒ»¸öÎÊÌ⣺
<jsp:useBean id="accountBiz" class="bank.AccountBiz"
scope="application">
Õâ¸ö±êÇ©ÖÐapplicationºÍsessi ......
³ÌÐòÈçÏÂ:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page language="java" %>
<%@ page import="com.mysql.jdbc.Driver" %>
<%@ page import ......
1¡¢ÎÒÓÃservletÉú³ÉµÄËæ»úÑéÖ¤Â룬·ÅÈësession
2¡¢ÔÚ·þÎñÆ÷¶ËÑéÖ¤Óû§ÊäÈëµÄÑéÖ¤ÂëÊÇ·ñÕýȷûÓÐÎÊÌâ
3¡¢¿ÉÊÇservlet´«µ½jspµÄÑéÖ¤ÂëºÍÎÒÔÚjsp´ÓsessionÖÐÈ¡µÃµÄÑéÖ¤Âë²»Ò»Ö£¬Ò³ÃæÏÔʾµÄ±ÈÎÒ´ÓsessionÖÐÈ¡µ½µÄÒª¿ì ......
¸÷λ´óÏÀ£¬Ð¡µÜæå¶Û£¬ÇëÈÏÕæ»Ø´ð£¡Ð»Ð»
ÓÐÁ½¸öÏÂÀÑ¡Ôñ¿ò£¬µÚÒ»¸öÑ¡Ôñ´óÀ࣬µÚ¶þ¸öÑ¡ÔñСÀ࣬Á½¸öÏÂÀÑ¡Ôñ¿òµÄÑ¡ÏîÈ«¶¼´ÓÊý¾Ý¿â²é³öÀ´¡£ÄÇôÔÚµÚÒ»¸öÑ¡Ôñ¿ò×ö³öÑ¡ÔñºóÈçºÎ°ÑÑ¡ÔñµÄÖµ´«¸øµÚ¶þ¸öÑ¡Ôñ¿òºÃÈõڶþ¸öÑ¡Ôñ ......