2013-03-21 49 views
0

我對JSP和HTML比較新。我被要求爲我的一些Perl項目製作一個GUI。但是,我可能會遇到容器問題。 基本上,每個容器都以單選按鈕的形式顯示從文件中讀取的結果。它工作正常,但突然間,其中一個容器開始消失。任何幫助將不勝感激。容器沒有顯示

感謝提前:)

<%@ page language="java" contentType="text/html; charset=UTF-8" 
    pageEncoding="UTF-8" import="java.io.*, java.net.*"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 

<html> 
    <head> 
     <title>Bi-Grams</title> 
     <style type="text/css"> 
      body {background-color:white;} 
      h3{color:black} 
     </style> 
    </head> 
    <body> 
     <h3>Tri-Grams of 13th Jan 2013 USA</h3> 
     <div id="content1" style="background-color:#EEEEEE;height:400px;width:400px;overflow:auto;border:2px solid;"> 
      <form> 
       <% 
        int i=0; 
        String line = null; 
        String []line_parts; 
        request.setCharacterEncoding("UTF-8"); 
        FileReader fis = new FileReader("/home/jones/testing/trigram-topics-13th.txt"); 
        BufferedReader br = new BufferedReader(fis); 
         while(br.readLine() != null){ 
         %> 
          <input type="radio" name="event_number" value="<%out.println(i);%>" > 
          <% 
           line = br.readLine(); 
           line_parts = line.split(" "); 
           out.println(line_parts[0]); 
          %> 
          <br> 
          <% 
          i++; 
         } 
        br.close(); 
       %> 
      </form> 
     </div> 
     <br/> 
     <h3>Tri-Grams of 14th Jan 2013 USA</h3> 
     <div id="content2" style="background-color:#EEEEEE;height:400px;width:400px;overflow:auto;border:2px solid;"> 
      <form> 
      <% 
       request.setCharacterEncoding("UTF-8"); 
       fis = new FileReader("/home/jones/testing/trigram-topics-14th.txt"); 
       br = new BufferedReader(fis); 
        while(br.readLine() != null){ 
        %> 
         <input type="radio" name="event_number" value="<%out.println(i);%>"> 
         <% 
          line = br.readLine(); 
          line_parts = line.split(" "); 
          out.println(line_parts[0]); 
         %> 
         <br> 
         <% 
         i++; 
        } 
       br.close(); 
      %> 
      </form> 
     </div> 
    </body> 
</html> 

回答

0

試試這個在CSS文件: -

//lets assume you had it under the id 'container' 
#container { 
      display: inherit !important; 
} 

,或者你可以在HTML文件中指定的樣式
例如:

<div style="display: inherit !important;"></div>