为什么我的页面没有响应?

时间:2013-10-30 09:56:54

标签: jsp twitter-bootstrap responsive-design

我使用bootstrap在html中执行了我的一个页面,这是响应。然后我尝试将该页面转换为jsp。现在该页面不像它应该来的那样进入移动设备。这是我的jsp页面的代码。

**<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script type='text/javascript' src='/dwr/interface/LoginService.js'></script>
<script type="/text/javascript" src="/js/curvycorners.src.js"></script>
<link type="text/css" href="/styles/new.css" rel="stylesheet"  />
<link type="text/css" href="/styles/lay4.css" rel="stylesheet" />
<link type="text/css" href="/styles/bootstrap.css" rel="stylesheet"/>
<link type="text/css" href="/js/template.css" rel="stylesheet" />
<link type="text/css" href="/css/bootstrap-responsive.css" rel="stylesheet" />
    <script type="text/javascript">     

    var id='<%=request.getParameter("id")%>';
    var address='<%=request.getParameter("location")%>';

    $(window).load(function() { 
        getDashBoard();
    });


    function getDashBoard(){
        LoginService.getDashboard(function(p){
            var catalog=JSON.parse(p);

            if(catalog != null){
                for(var key in catalog) {
                    var value = catalog[key];

                    $("<li class='latestnews_lnews'>"+value.patient+",<b>Phno:</b>"+value.contactno+",<b>Date:</b>"+value.date+",<br><b>Start:</b>"+value.start+",<b>End:</b>"+value.end+"</li>").appendTo("#appointments");
                }
            }


        });
    }
     function gotoDrProfile(){


         window.location = "/endusers/dashdoctorprofile?id="+id+"&location="+address; 
    }

    function gotoDrClinic()
    {
         window.location = "/endusers/doctorclinic?id="+id+"&location="+address; 
    }

    function gotoAppointmentSchedular()
    {
         window.location = "/endusers/doctoApponintmentSchedular?id="+id+"&location="+address; 
    } 

    function gotoPatient()
    {
         window.location = "/endusers/patientProfile?id="+id+"&location="+address; 
    }

     function gotoDoctoConnect()
    {
         window.location = "/endusers/doctoConnect?id="+id+"&location="+address; 
    }

    function gotoAriticles()
    {
         window.location = "/endusers/doctoArticle?id="+id+"&location="+address; 
    }

    function gotoSetupConfig()
    {
         window.location = "/endusers/doctoSetupConfig?id="+id+"&location="+address; 
    } 

    function gotoReports()
    {
         window.location = "/endusers/doctorReport?id="+id+"&location="+address; 
    } 

    </script>
    <style type="text/css">     
        .lbl_design
        {
            padding:2px; margin-top:5px;
            font-family:Verdana, Geneva, sans-serif;
            font-size:18px;
            font-style:italic;
            font-weight:bold;

        }
    .clear
    {
        height:30px;
        clear:both;
    }

    .link
    {
        font-size:13px;
        text-decoration:underline;
        margin-left:14px;
        color:#0a7119;
    }

    .space
    {
        height:54px;
        clear:both;
    }
    </style>
</head>
<body>
    <form id="dashboard" name="dashboard" method="post">
    <div class="container" style="vertical-align: top;">
    <div class="content">
      <div class="row" style="margin-top:100px;">
      <div class="container" style="margin:30px; 0px 0px 20px;">
        <div class="row-fluid well">
            <div class="span12">
                <div class="span4">
                              <table style="width:100%" cellpadding="0px" cellspacing="0px" >
                            <tr>
                                <td style="width:30%" align="center">
                                    <img src="/images/monyter.png" width="128" height="85" style="cursor: pointer;" onclick="gotoReports()"/><br/>                                   
                                </td>
                                </tr>
                                <tr><td style="height:5px">&nbsp;</td></tr>
                                <tr><td align="center"  onclick="gotoReports()" style="cursor: pointer;"> <span class="lbl_design" style="margin-left:-15px"><font color="#772953">Monyter</font></span></td></tr>
                                </table>

                            <div class="space1"></div> 

                        <table style="width:100%" cellpadding="0px" cellspacing="0px" >
                        <tr>
                        <td style="width:30%" align="center">
                        <img src="/images/profile.png" height="128" width="128" onclick="gotoDrProfile()" style="margin-left:20px; cursor: pointer;"/><br/>

                        </td>
                        </tr>
                        <tr><td>&nbsp;</td></tr>
                        <tr><td align="center" onclick="gotoDrProfile()" style="cursor: pointer;"> <span class="lbl_design"><font color="#b94a48">My Profile</font></span></td></tr>
                        <tr><td>&nbsp;</td></tr>
                        <tr><td>&nbsp;</td></tr>
                        </table>
                            <div class="space"></div>     
                        <table style="width:100%" cellpadding="0px" cellspacing="0px" >
                        <tr>
                        <td style="width:30%" align="center">
                        <img onclick="gotoAppointmentSchedular()" src="/images/appoint.png" height="128" width="128" style="cursor: pointer;"/>

                        </td>
                        </tr>
                        <tr><td style="height:5px">&nbsp;</td></tr>
                        <tr><td align="center" onclick="gotoAppointmentSchedular()" style="cursor: pointer;"> <span class="lbl_design" ><font color="#b94a48">Appointment Scheduler</font></span></td></tr>
                        <tr><td style="height:25px">&nbsp;</td></tr>
                        </table>

                          <div class="space"></div> 

                  <table style="width:100%" cellpadding="0px" cellspacing="0px" >
                            <tr>
                                <td style="width:30%" align="center" >
                                    <img onclick="gotoPatient()" src="/images/patients.png" height="128" width="128" style="cursor: pointer;"/><br/>

                                </td>
                                </tr>
                                <tr><td style="height:5px">&nbsp;</td></tr>
                                 <tr><td align="center" onclick="gotoPatient()" style="cursor: pointer;"> <span class="lbl_design" style="margin-left:-15px"><font color="#772953">Patient</font></span></td></tr>
                              <tr><td style="height:25px">&nbsp;</td></tr>

                                </table>
                   <div class="space"></div> 
                  <table style="width:100%" cellpadding="0px" cellspacing="0px" >
                            <tr>
                                <td style="width:30%" align="center" >
                                    <img src="/images/Reports.png" onclick="gotoReports()" height="128" width="128" style="cursor: pointer;"/><br/>

                                </td>
                                </tr>
                                <tr><td style="height:5px">&nbsp;</td></tr>
                                <tr><td align="center" onclick="gotoReports()" style="cursor: pointer;"> <span class="lbl_design" style="margin-left:-15px"><font color="#772953">Reports</font></span></td></tr>
                                <tr><td style="height:25px">&nbsp;</td></tr>

                                </table>
                </div>

                <div class="span4">

                      <div class="side_div" style="background-color:#f2dede;">
         <div class="side_div_top" style="background-color:#b94a48;"><div style="width:18px; margin-top:-3px"><img src="/images/icon-1.png" height="20" width="26"/></div><div class="side_top_text">Patient appointment</div></div>
            <div class="side_top_inn">
                <ul id="appointments" style="list-style-image:url(/images/arrow.png);">

                </ul>
                 <a href="#" class="link">Read More</a>
            </div>      
         </div>
                <div class="clear"></div>

                <div class="side_div" style="background-color:#dff0d8;">
         <div class="side_div_top" style="background-color:#468847;"><div style="width:18px; margin-top:-3px"><img src="/images/not.png" height="20" width="26"/></div><div class="side_top_text">Notification</div></div>
            <div class="side_top_inn">
                <ul style="list-style-image:url(/images/arrow.png);">
                 <li class="latestnews_lnews">Lorem Ipsum is simply dummy text</li>
                 <li class="latestnews_lnews">Lorem Ipsum is simply dummy text</li>

                 </ul>
                 <a href="#" class="link">Read More</a>
            </div>      
         </div>
                <div class="clear"></div>
                 <div class="side_div" style="background-color:#d9edf7;">
         <div class="side_div_top" style="background-color:#3a87ad;"><div style="width:18px; margin-top:-3px"><img src="/images/connect.png" height="20" width="26"/></div><div class="side_top_text">Docto Connect</div></div>
            <div class="side_top_inn">
                <ul style="list-style-image:url(/images/arrow.png);">
                 <li class="latestnews_lnews">Lorem Ipsum is simply dummy text</li>
                 <li class="latestnews_lnews">Lorem Ipsum is simply dummy text1</li>

                 </ul>
                 <a href="#" class="link">Read More</a>
            </div>      
         </div>

                 <div class="clear"></div>

                 <div class="side_div" style="background-color:#f6cde3;">
         <div class="side_div_top" style="background-color:#772953;"><div style="width:18px; margin-top:-3px"><img src="/images/paper.png" height="20" width="26"/></div><div class="side_top_text">Articles</div></div>
            <div class="side_top_inn">
                <ul style="list-style-image:url(/images/arrow.png);">
                 <li class="latestnews_lnews">Lorem Ipsum is simply dummy text</li>
                 <li class="latestnews_lnews">Lorem Ipsum is simply dummy text1</li>

                 </ul>
                 <a href="#" class="link">Read More</a>
            </div>      
         </div> 


                </div>

                <div class="span4">
                    <div id="smartEHR_new" >
                       <table style="width:100%" cellpadding="0px" cellspacing="0px" >
                            <tr>
                                <td style="width:30%" align="center">                                
                                    <img src="/images/doclinic.png" onclick="gotoDrClinic()" height="128" width="128" style="cursor: pointer;"/>
                               </td>
                                </tr>
                                        <tr><td style="height:5px">&nbsp;</td></tr>
                                  <tr>
                                    <td align="center" style="cursor: pointer;" onclick="gotoDrClinic()">  
                                        <span class="lbl_design">
                                            <font color="#b94a48">Clinic</font>
                                        </span>
                                   </td></tr>
                             <tr><td style="height:25px">&nbsp;</td></tr> 
                                </table>                               
            <div class="space"></div>                     
                       <table style="width:100%" cellpadding="0px" cellspacing="0px" >
                                        <tr>
                                            <td style="width:30%" align="center">
                                                <img onclick="gotoSetupConfig()" src="/images/settings.png" width="128" height="128" style="cursor: pointer;"/>

                                            </td>
                                            </tr>
                                             <tr><td style="height:5px">&nbsp;</td></tr>
                                            <tr><td align="center" onclick="gotoSetupConfig()" style="cursor: pointer;"> <span class="lbl_design" style="margin-left:10px"><font color="#9900CC">Setup And Configuration </font></span></td></tr>
                                            <tr><td style="height:25px">&nbsp;</td></tr>
                                            </table>      
             <div class="space"></div>                    
                       <table style="width:100%" cellpadding="0px" cellspacing="0px" >
                            <tr>
                                <td style="width:30%" align="center">
                                    <img src="/images/commun.png" onclick="gotoDoctoConnect()" width="128" height="128" style="cursor: pointer;"/>

                                </td>
                                </tr>
                                 <tr><td style="height:5px">&nbsp;</td></tr>
                                <tr><td align="center" onclick="gotoDoctoConnect()" style="cursor: pointer;"> <span class="lbl_design" style="margin-left:10px"><font color="#9900CC">Docto Connect</font></span></td></tr>
                                <tr><td style="height:25px">&nbsp;</td></tr>
                                </table>
             <div class="space"></div>    
                       <table style="width:100%" cellpadding="0px" cellspacing="0px" >
                            <tr>
                                <td style="width:30%" align="center">
                                    <img src="/images/articles.png"  onclick="gotoAriticles()" width="128" height="128" style="cursor: pointer;"/>

                                </td>
                                </tr>
                                <tr><td style="height:5px">&nbsp;</td></tr>
                                <tr><td align="center" onclick="gotoAriticles()" style="cursor: pointer;">  <span class="lbl_design" style="margin-left:15px"><font color="#9900CC">Articles</font></span></td></tr>
                                <tr><td style="height:25px">&nbsp;</td></tr>

                                </table>
                </div>
            </div>        
        </div>
    </div>
    </div>
       </td>
      </tr>
     </table>
    </div>
   </div>
 </div>       
 </form>
</body>
</html>**

很抱歉上传总页数,但我没有发现问题,为什么它不响应。 谢谢你寻找并试图解决我的问题:D

1 个答案:

答案 0 :(得分:0)

使用它,至少对我有用。 width = device-width允许主体至少100%宽,即使屏幕尺寸发生变化。