我有一些内容存储在变量中,我想将该内容字符串附加到HTML div中。
以下是脚本代码:
if ( $( "#eroare" ).val()!="") {
alert("Error 2" + $( "#eroare" ).val());
var aux = $( "#eroare" ).val();
alert("aux="+aux);
$( "#errorSuccess" ).html( "<b>" + aux + "</b>"); //this is not working
}
以下是 HTML 代码:
<div id="errorSuccess" >ceva</div>
<div><input type="hidden" id="eroare" value="${sessionScope.errmsg}" /></div>