$ .Ajax中的问题?!!! [英] Problem in $.Ajax ?!!!
本文介绍了$ .Ajax中的问题?!!!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨所有
在Aspx页面我有:
hi all
in Aspx Page I Have :
<asp:LinkButton ID="LinkBtn1" runat="server" CssClass="Tag" ClientIDMode="Static" Visible='<%# SetVisible(Eval("Tag1"))%>'><%# SetTag(Eval("Tag1"))%></asp:LinkButton>
和myScript在下面。为什么$(this)是Unknown?
and myScript is below.Why $(this) is Unknown?
$('.Tag').mouseenter(function () {
var t = $(this).html();
var tagName2 = encodeURIComponent(t);
$.ajax({
url: 'Test2.aspx?Name=' + tagName2,
success: function (data) {
if (data == "")
return;
//in This Section $(this) is Unknown.Why?How To Access $(this)
$(this).append('<div class="TagComment2"> slm man khubam</div>');
alert('Test');//and alert Not Show!WHy?
}
});
推荐答案
(这个)是未知的?
(this) is Unknown?
(' .Tag')。mouseenter(function(){
var t =
('.Tag').mouseenter(function () { var t =
(< span class =code-keyword> this )。html();
var tagName2 = encodeURIComponent(t);
(this).html(); var tagName2 = encodeURIComponent(t);
这篇关于$ .Ajax中的问题?!!!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文