jQuery Ajax request - href target ends up outside tags

I am using jQuery to make an AJAX call. The call is procesed and returns data as expected, but when I use `$("#newsLetterForm").html(data);` the link address pops OUT of the `` tags. **The Ajax Request** $.ajax({ async: true, data: $dataToSend, datatype: 'html', beforeSend: function() { $('#newsletterForm').html('waiting'); }, error: function(jqXHR, textStatus) { $('#newsletterForm').html("Error: " + textStatus); }, success: function(data, textstatus, jqXHR) { $('#newsletterForm').html(data); }, timeout: 3000, type: 'POST', url: 'http://myurl.com', }); **Alert Return Data** - notice Support is in the tags There was an error processing your request. Please send your request to Support **Output to Browser** - notice that Support is *outside* of the tags There was an error processing your request. Please send your request to Support Why is this happening?

以上就是jQuery Ajax request - href target ends up outside tags的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏