The problem in getting the page content, according to the normal content should be to normal link, because In response, they are normal, but when you insert the right content div is removed links.

获取页面内容的问题,按照正常的内容应该是正常的链接,因为在响应中,它们是正常的,但是当你插入正确的内容div时会删除链接。

$.ajax({
    type: "GET",
    url: url,
    dataType: "html",
    cache: false,
    success: function(data)
{
var a=$('.glavnoe',data).eq(n);
$('.glavnoe').eq(n).html(a);
}
});

n - is position of className tag

n - 是className标记的位置

The result before ajax is

ajax之前的结果是

<a href="/xxx/xxx/xx/xx/xxxxx/"><img src="http://xxxx.jpg" /><br>
<h4>Something</h4></a>

result after ajax is

ajax之后的结果

<a href="/xxx/xxx/xx/xx/xxxxx/"></a><img src="http://xxxx.jpg" /><br>
<h4>Something</h4>

You see, before requesting a normal tag, but after the tag is closed immediately. What are the possible solutions to this problem?

在请求正常标记之前,您会看到标记立即关闭之后。这个问题的可能解决方案是什么?

UPD1: Problem is in slash on end of the links, if somehow remove this slash problem will be solved, but how ???

UPD1:问题是在链接结束时斜线,如果以某种方式删除此斜杠问题将被解决,但如何???

1 个解决方案

#1


0

Unfortunately for jQuery easily can not solve this problem. Wrote at javascript xmlhttp request with the parser on iframe, there is no such problem appeared.

不幸的是,jQuery很容易无法解决这个问题。用iframe上的解析器写了javascript xmlhttp请求,没有出现这样的问题。

更多相关文章

  1. jQuery图片热点链接添加编辑插件
  2. 删除一个HTML标记,但是保留innerHtml
  3. 如何在HTML中为移动页面创建图像下载链接?
  4. 在Paragraph标记中添加“名称”以使用POST
  5. 未捕获的ReferenceError:函数未定义,它标记
  6. 布局的标记建议和一些更一般的问题
  7. js去除html标记的测试问题。很多分!
  8. 9.1.4 前端 - HTML body标签 - 标题,段落,分割线,换行,特殊符号,列
  9. 单击链接中的复选框会导致以下链接——我如何避免这种情况?

随机推荐

  1. TP5.0 PHPExcel 数据表格导出导入
  2. PHP识别相片是否是颠倒的,并且重新摆正相
  3. 避坑!用 Docker 搞定 PHP 开发环境搭建
  4. php开发常见问题总结
  5. PHP中的进制转换
  6. PHP中关于trait使用方法的详细介绍
  7. PHP 代码优化 技巧总结
  8. php魔术常量教程
  9. PHP:微信支付服务商开发相关的那点事
  10. 使用PHP自建稳定可靠的守护程序