我有一个班级
<div class='navigation five-icons'></div>
我想加载一个在其中返回 html 的 URL,如何使用 jquery 选择该 div,我尝试的是
 $('.navigation .five-icons').load('URL');
 $('.navigation.five-icons').load('http://www.astuffaday.com/shot/menu.php');
但没有用。
我有一个班级
<div class='navigation five-icons'></div>
我想加载一个在其中返回 html 的 URL,如何使用 jquery 选择该 div,我尝试的是
 $('.navigation .five-icons').load('URL');
 $('.navigation.five-icons').load('http://www.astuffaday.com/shot/menu.php');
但没有用。
您是否尝试异步获取数据?
使用$.post()或$.get()  
$.post('filename.php', {'name1':'value1', 'name2':'value2'}, function(result) {
   alert(result);  // result has the HTML content returned by filename.php
   $('#resultDiv').html(result);  // resultDiv will have its contents
   // Now you need to get only particular div
   // You can use 'find()'
   // Something like this may help  [Have not been tested]
   var data = $('result').find('.navigation .five-icons');
   alert(data);
})
我不知道加载,但您可以使用下面的代码来选择多个类
$('.navigation, .five-icons')