2013-07-08 85 views
0
public void DisplayIndexPage(PrintWriter out, String htmlPath) 
     { 
     <html> 
     <head> 
     <title>Test IE 10 </title> 
     <SCRIPT LANGUAGE = JavaScript> 
     function hintPopUp() 
     { 
     if (navigator.appName == "Netscape") 
     { 
     alert("Please install Internet Explorer"); 
     } 
     } 
     </SCRIPT> 
     </head> 
     <frameset cols="192,*" border=0 frameborder=0> 
     <frame name="menu" src="some java file 1" noresize > 
     <frameset rows="55,50,*" border=0 frameborder=0> 
     <frame name="banner" scrolling="no" noresize src="/IE10/header.html"> 
     <frame name="bottom" scrolling="no" noresize src="JAVA file 2"> 
     <frame name="main" src="/IE10/main.html"> 
     </frameset> 
     <noframes> 
     <body onLoad="hintPopUp();"> 
     <p>This page uses frames, but your browser doesn't support them.</p> 
     </body> 
     </noframes> 
     </frameset> 
     </html> 
} 

我已經在servlet(使用out.println)用戶定義的方法寫了上面的代碼,然後在doPost方法內調用此方法。當在IE10中訪問此頁面時,源代碼將打印在瀏覽器中。在以前的IE版本中,網頁工作正常。在IE10中的網頁顯示問題

回答