显示时有一部分图片和内容显示不出来,只显示例如这样的代码 
#000000;font-size:12px;line-height:18px;} .ui_top a:link{color:#000000;text-decoration:none;} .ui_top a:visited{color:#000000;text-decoration:none;} .ui_top a:hover {color:#000000;text-decoration:underline;} .up1 {color:656565;line-height:18px;font-size:12px} .up1 td{color:#656565;line-height:18px;font-size:12px} .up1 A:link {color:#656565;text-decoration:none;line-height:18px;font-size:12px} .up1 A:Visited {color:#656565;text-decoration:none;} .up1 A:Hover {color:#656565;TEXT-DECORATION: underline;} 
    document.write("  ");ad_dst = ad_dst+1;   document.write("  ");ad_dst = ad_dst+1;      document.write("  ");ad_dst = ad_dst+1; 
  
我是这么写程序的,请问哪儿出错了呢?请高手指点。if(str1.equals("8亿件衬衫换一架飞机"))
                    {
                     String s = null;
                       try 
                       {
                        s="http://business.sohu.com/20050510/n225491966.shtml";
                         if (DEBUG) 
                          {
                            System.out.println("Help URL is " + s);
                          }
                         helpURL = new URL(s);
                         displayURL(helpURL);
                        }
                       catch (Exception e1) 
                         {
                           System.err.println("Couldn't create help URL: " + s);
                         }
                      
                     } 
 private void displayURL(URL url) 
       {
          try 
          {
            htmlPane.setPage(url);
          }
        catch (IOException e) {
            System.err.println("Attempted to read a bad URL: " + url);
        }
      }

解决方案 »

  1.   

    不是显示网页的代码,是显示网页的内容。把整个网页显示出来,我都弄出来了,就是有些flash和图片显示不出来
      

  2.   

    有些flash和图片显示不出来???
    你是说你已经能显示一些 flash 和图片???哪你看看你图片路径对不
      

  3.   

    应该是图片和flash的路径的问题,你可以打印下它们的路径,也可以查看下源文件,建议用绝对路径!
      

  4.   

    我想直接显示一些网站上的网页,网页不是我自己编的,例如显示sohu.com ,那么上面的有些就显示不出来