在jsp中包含Div标签 [英] Include Div tag in jsp
本文介绍了在jsp中包含Div标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<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/11/25");
});</script>
<td><strong>
<%out.print("<div id=\"clock\">"+rs.getString(8)+"</div>"); %>
</strong></td>
我想在jsp标签中打印div内容.我应该怎么做才能在jsp的输出中显示div.请帮帮我.感谢您的良好解决方案.
I want to print the div content in jsp tag.What i should do to display div in jsp's output.Please help me out.I would appreciate your good solutions.
推荐答案
您不必使用:
<%out.print("<div id=\"clock\">"+rs.getString(8)+"</div>"); %>
您可以简单地使用:
<div id="clock"><%=rs.getString(8)%></div>
在JSP文件中,您可以直接使用任何html标记.
In a JSP file you can use any html tag directly.
这篇关于在jsp中包含Div标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文