JSP表达式中的DIV标记

时间:2016-12-01 06:14:28

标签: html jsp

<html>
  <head>
    <script>
      $(document).ready(function(){

         $(function() {
            $( "#datepicker" ).datepicker({ minDate:1,dateFormat: 'yy/mm/dd' });
         });

         // on changing date initilize the countdown again
         $("#datepicker").change(function(){
            init($(this).val());
         })

         function init(dt){
            $('#clock').countdown(dt).on('update.countdown', function(event) {
                var $this = $(this).html(event.strftime(''
                  
                  +'<span>%-d</span> day%!d '
                  ));
            });
         }

         //initilize counter on load with some default date
         init("2016/12/25");

      });
</script>
    </head>
  <body>
    <table >
 <thead>

<tr>
<th width="50">
S.NO
</th>
<th>
SchoolId
</th>
<th>
RegistrationDate
</th>
<th>
SchoolName
</th>
<th>
SchoolAddress
</th>
<th>
SchoolPin
</th>
<th>
SchoolPassword
</th>
<th>
Validity
</th>
<th>
Export To Excel
</th>

</tr>
 </thead>
  <tbody>
    
    <%

    while(rs.next())
    {
    	%>
    	<tr align="center">
    	
    	<td><strong>
    	<%out.print(rs.getString(1)); %>
    	</strong></td>
    	
    	<td><strong>
    	<%out.print(rs.getString(2)); %>
    	</strong></td>
    	    	
    	<td><strong>
    	<%out.print(rs.getString(3)); %>
    	</strong></td>
    	
    	<td><strong>
    	<%out.print(rs.getString(4)); %>
    	</strong></td>
    	
    	<td><strong>
    	<%out.print(rs.getString(5)); %>
    	</strong></td>
    	
    	<td><strong>
    	<%out.print(rs.getString(6)); %>
    	</strong></td>
    	
    	<td><strong>
    	<%out.print(rs.getString(7)); %>
    	</strong></td>
        	
    	<td><strong><div id="clock">
    	 <%out.print(rs.getString(8));%>
    	</div></strong></td>
    	   	
    	<td><strong>
    <a href="export.jsp?school=<%=(rs.getString(2))%>" class="btn btn-success btn-sm">
	                  Export
	                </a>
    	</strong></td>
    	
       	
    	</tr>
    	
   
    	<%
    }
}
catch(Exception e)
{
	System.out.println(e);
}
%>
</tbody>
 </table>
    </body>
    </html>

我想在有效列中显示剩余天数,这样做我刚刚插入 jsp表达式中的div标签如图所示(&lt;%out.print(rs.getString(8));%&gt;)。我没有得到表数据的输出。请帮助我在有效期栏中获得剩余天数。我将非常感谢您的好答案。

0 个答案:

没有答案