<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
</script>
<script>
var huifu;
var yincang;
function huifus(obj){
huifu ="#"+ obj.id;
yincang ="."+ obj.id;
}
$(document).ready(function(){
$(huifu).click(function(){
$(yincang).toggle();
});
});
</script>
<div style="font-size: 5px">[[${comment.times}]]    <a th:id="${comment.id4}" onclick="huifus(this)" class="huifu">回复</a></div>
<div th:class="${comment.id4}" style="display:none;padding-top:10px;padding-bottom:20px;">
<input type="text"
style="float: left; width: 90%; height: 30px; margin-left: 10px;"
value="" name="content" />
<button style="float: right; font-size: 15px; margin-right: 50px;"
type="submit">发表</button>
</div>
div的隐藏与显示,为什么上面这样写前端界面点击回复没反应?