jQuery $.get/$.post,IE 不显示所有内容
我在 jquery 代码中执行一些 get/post 操作,返回一些 html 代码。该 html 代码通常是一两个 div,其中包含一些长文本。它在 FF 或 Chrome 中工作正常,但在 IE (7/8) 中它只显示第一个 div,而不显示第二个。我花了 3 天的时间,但没有找到任何解决方案:-(
感谢您的帮助
编辑:
一些代码:
$.post("http://www.xxx.pl/xxx/get_xxx.php?hash=<?php echo md5(time());?>&OBJW="+$(this).attr("id_objw"),function(data3){
$("#LEK").html(data3);
});
I do some get/post action in my jquery code which return some html code. This html code is usualy one or two div's with some long text in it. It work fine in FF or Chrome, but in IE (7/8) it only display first div without the second one. I spend 3 days on it, but I didn't find any solution :-(
Thank you for any help
EDIT:
some code:
$.post("http://www.xxx.pl/xxx/get_xxx.php?hash=<?php echo md5(time());?>&OBJW="+$(this).attr("id_objw"),function(data3){
$("#LEK").html(data3);
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
几个月前我遇到了类似的问题,是关于格式错误的 html 标记。服务器返回的 html 有未闭合的标签。更正 ajax 调用返回的 html 标记解决了我的问题。
I had similar problems few months back and it was about malformed html markup. the html returned by server had unclosed tags. Correcting html markup that is returned by ajax call solved the problem for me.
IE 有一个内置的调试器(如果你没有其他东西)可以用它来查看结果。检查一些服务器错误,检查您在 get/post 中使用的类型
IE has a built-in debugger (if you have not anything else) use it to see what's there in result. Check for some server errors, check the type you're using in get/post
也许您应该告诉浏览器不要缓存结果。 IE 的缓存机制与其他浏览器不同。尝试
但是,这对 post() 没有影响,它只影响 get()
Maybe you should tell the browser not to cache the result. IE's caching mechanism works different from other browsers. Try
However, this has no effect on post(), it only affects get()