【发布时间】:2013-04-28 03:28:45
【问题描述】:
这是我的代码,我想在文本中附加图像
代码:
$(".ChatSend").click(function () {
strChatText = $('.ChatText', $(this).parent()).val();
var recievertext= $('.ausername').html();
if (strChatText != '') {
var strGroupName = $(this).parent().attr('groupname');
if (typeof strGroupName !== 'undefined' && strGroupName !== false)
chat.server.send($("#hdnUserName").val() + ' : ' + strChatText, $(this).parent().attr('groupname'));
//this code is not working
**var userphoto="<img height=\"18px\" width=\"18px\" src=\"userimages/5.jpg\" />";
$('.ChatText', $(this).parent()).find('ul').append(userphoto + strChatText);**
//end of this code is not working
$('.ChatText', $(this).parent()).val('');
}
return false;
});
【问题讨论】:
标签: javascript jquery asp.net jquery-ui signalr