Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JAVA ÖÐURLÁ´½ÓÖÐÎIJÎÊýÂÒÂëµÄ´¦Àí·½·¨

JAVA ÖÐURLÁ´½ÓÖÐÎIJÎÊýÂÒÂëµÄÈô¸É´¦Àí·½·¨£¬ÏÖÔÚÕûÀíÊÕ¼ÈçÏÂ:
·½·¨Ò»£º
http://xxx.do?ptname='ÎÒÊÇÖйúÈË'
String strPtname = request.getParameter("ptname");
strPtname = new String(strPtname.getBytes("ISO-8859-1"), "UTF-8");  
·½·¨¶þ£º
<%@ page contentType="text/html;charset=gb2312" %>
<a href="ds.jsp?url=<%=java.net.URLEncoder.encode("±àÂëµÄÊÇÕâÀï","GB2312")%>">µã»÷ÕâÀï</a>
<%
//request.setCharacterEncoding("GBK");
if(request.getParameter("url")!=null)
{
str=request.getParameter("url");
str=java.net.URLDecoder.decode(str,"GB2312");
str=new String(str.getBytes("ISO-8859-1"));
out.print(str);
}
%>
==================================
public String chinatoString(String str)
     {
      String s=str;
      try
      {
       byte tempB[]=s.getBytes("ISO-8859-1");
       s=new String(tempB);
       return s;
      }
      catch(Exception e)
      {
       return s;
      }
    }
====================================================
function URLencode(sStr)
    {
      return escape(sStr).
               replace(/\+/g, '%2B').
                  replace(/\"/g,'%22').
                     replace(/\'/g, '%27').
       


Ïà¹ØÎĵµ£º

JavaÖеÄinstanceof¹Ø¼ü×Ö

instanceofÊÇJavaµÄÒ»¸ö¶þÔª²Ù×÷·û£¬ºÍ==£¬>£¬<ÊÇͬһÀà¶«¶«¡£ÓÉÓÚËüÊÇÓÉ×Öĸ×é³ÉµÄ£¬ËùÒÔÒ²ÊÇJavaµÄ±£Áô¹Ø¼ü×Ö¡£ËüµÄ×÷ÓÃÊDzâÊÔËü×ó±ßµÄ¶ÔÏóÊÇ·ñÊÇËüÓұߵÄÀàµÄʵÀý£¬·µ»ØbooleanÀàÐ͵ÄÊý¾Ý¡£¾Ù¸öÀý×Ó£º
¡¡¡¡String s = "I AM an Object!";
¡¡¡¡boolean isObject = s instanceof Object;
¡¡¡¡ÎÒÃÇÉùÃ÷ÁËÒ»¸öStrin ......

java¶àÏß³Ì

¹Ø¼ü×Ö: java¶àÏß³ÌÀý×Ó
µ½ÕâÀïÎÒÃÇ×öÒ»¸öÍêÕûµÄÀý×ÓÀ´ËµÃ÷Ï̲߳úÉúµÄ·½Ê½²»Í¬¶øÉú³ÉµÄÏ̵߳ÄÇø±ð£º
package debug;
import java.io.*;
import java.lang.Thread;
class MyThread extends Thread{
public int x = 0;
public void run(){
System.out.println(++x);
}
}
class R implements Runnable{ ......

javaÓÃĬÈÏÓ¦ÓóÌÐò´ò¿ª¹ØÁªµÄÎļþ

import java.awt.Desktop;
import java.io.File;
import java.io.IOException;
public class TestDesktop {
public static void main(String[] a) {
try {
Desktop desktop = null;
if (Desktop.isDesktopSupported()) {
desktop = Desktop.getDesktop();
}
desktop.open(new File("/hom ......

java web±ê¼Ç¼¼Êõ

1 jsp »ù´¡¸ÅÄî
    jspÊÇÔÚ´«Í³µÄhtmlÒ³ÃæÖУ¬¼ÓÈëjavaµÄ³ÌÐòƬ¶ÎºÍjsp±ê¼Ç£¬¾Í¹¹³ÉÁËjspÒ³Ãæ¡£µ±web·þÎñÆ÷Óöµ½¶ÔjspµÄ·ÃÎÊÇëÇóʱ£¬ÏÈÖ´ÐÐ¶ÔÆäÖеÄjava³ÌÐòƬ¶Î£¬È»ºóÒÔhtmlµÄ¸ñʽ·µ»Ø¸øÓû§¡£   java³ÌÐòƬ¶Î¿ÉÒÔÓÃÀ´²Ù×÷Êý¾Ý¿â£¬Öض¨ÏòÍøÒ³£¬»òÕßÊÇ·¢ËÍE-mail ,ÑéÖ¤µÇ½ÐÅÏ¢£¬ ÕâЩ²Ù×÷¶¼ÊÇÔÚ·þÎñÆ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ