´«ÖDz¥¿Í——JSP£¨ËÄ£©¹¤³§Ä£Ê½
Ò»£º¹¤³§Ä£Ê½³öÏÖµÄÔÒò
Ò»°ãÉè¼ÆÄ£Ê½£º
view plaincopy to clipboardprint?
interface Fruit{
public void eat();
}
class Apple implements Fruit{
public void eat(){
System.out.println("**³ÔÆ»¹û**") ;
}
}
class Orange implements Fruit{
public void eat(){
System.out.println("**³ÔéÙ×Ó**") ;
}
}
public class FactoryDemo01{
public static void main(String args[]){
Fruit f = new Apple();
f.eat();
}
}
interface Fruit{
public void eat();
}
class Apple implements Fruit{
public void eat(){
System.out.println("**³ÔÆ»¹û**") ;
}
}
class Orange implements Fruit{
public void eat(){
System.out.println("**³ÔéÙ×Ó**") ;
}
}
public class FactoryDemo01{
public static void main(String args[]){
Fruit f = new Apple();
f.eat();
}
}
ÔÚÕâÖÖÆÕͨµÄ±àÂ뷽ʽÖУ¬ºóÐøµÄÀ©Õ¹¹¦Äܽ«ÊÇÔÖÄÑ£¬µ±ÓÐеÄË®¹ûÀàÔö¼Óʱ£¬±ØÐë·³öÔ´Âë½øÐÐÐ޸ģ¬Õâ¶ÔÓÚÒ»¸öÅ
Ïà¹ØÎĵµ£º
JavaScript´úÂ룺
//°ìÊ´¦³éÈ¡±ÈÀý¸Ä±ä£¬¸üÐÂÆäËûÊý¾Ý
....function changeOfficeSampleScale(obj,flushOfficeRow){
var row=obj.parentNode.parentNode; //È¡µÃËùÔÚÐÐ
var officeCode=row.id; //È¡µÃÐеÄId
if(i ......
Ò».request¶ÔÏó
¿Í»§¶ËµÄÇëÇóÐÅÏ¢±»·â×°ÔÚrequest¶ÔÏóÖУ¬Í¨¹ýËü²ÅÄÜÁ˽⵽¿Í»§µÄÐèÇó£¬È»ºó×ö³öÏìÓ¦¡£ËüÊÇHttpServletRequestÀàµÄʵÀý¡£
µ±request¶ÔÏó»ñÈ¡Óû§Ìá½»µÄºº×Ö×Ö·ûʱ£¬»á²úÉúÂÒÂ룬ÓÉÏÂÃæµÄ·½·¨¿ÉÒÔ½â¾ö£º
¡¡¡¡ Sting s2 = new String(s1.getBytes("iso8859-1"),"GB2312") ......
ѧϰjspʱ£¬ÂÒÂëÒ²ÊÇÒ»¸öºÜÍ·Í´µÄÊ¡£
1.ÔÚjspÎļþ¿ªÍ·¼ÓÉÏ<%@ page contentType="text/html; charset=GBK"%>
2.½â¾öpost·½Ê½Ìá½»ÄÚÈݵÄÂÒÂ룺request.setCharcterEncoding("GBK");
3.½â¾öurl(get£¬³¬Á´½Ó)·½Ê½ÂÒÂëÎÊÌâÊÇÅäÖÃservlet.xml.ÔÚ<Connector>±êÇ©ÖÐÌí¼ÓÒ»¾äURIEncoding="GBK" »òÕß string ......