HTML テキストを my に渡そうとしていますdiv
。この文字列を HTML 要素としてレンダリングする必要があります。私のコード:
<div id="divchat" style="width: 500px; height: 300px; border: 2px solid brown;"/></div>
@Html.TextBoxFor(model => model.msj)
<button type="submit" id="btnSend">Send</button>
<script>
$(function(){
var chatNS = '@HttpContext.Current.Application["Chateo"].ToString()';
$("#divchat").append(chatNS);
});
</script>
div
は文字列のようにコンテンツを表示していますが、HTML 要素を正しくレンダリングするにはどうすればよいdivchat
ですか?