开发者

jQuery load() doesn't work on IE and Chrome

开发者 https://www.devze.com 2023-02-02 23:53 出处:网络
the code below doesn\'t work with IE8 and Chrome but only work with Firefox. 开发者_如何学JAVAFYI, I\'m using Dreamweaver CS5.

the code below doesn't work with IE8 and Chrome but only work with Firefox.

开发者_如何学JAVAFYI, I'm using Dreamweaver CS5.

$(document).ready(function() {
 $('#buttonEphone').click(function() {
  $('#apDiv2').load('ePhone.html');
 });

 $('#buttonEPC').click(function() {
  $('#apDiv2').load('ePC.html');
 });
});


As I said in the comment, this sounds like you are using a local html file, and not a url starting with http://. If that is the case, than I suspect that your problem is with security restrictions of chrome and IE on local ajax, not with jQuery (I incidentally encountered this problem with Chrome a few weeks ago).

0

精彩评论

暂无评论...
验证码 换一张
取 消