-2

我正在使用 jquery 将 html 页面(比如 b.html)包含到 html 页面(a.html)中,b.html 页面中包含 6 个链接..我想在 a.html 的 php 内容下方显示它们,但在 php 内容加载 b.html 之前显示。我怎样才能在 php 下获得 html 页面?

<script>(a.html)
jQuery(document).ready(function(){

$("#includedContent").load("/templates/default/property/tab.html");
});
</script>
in html page (a.html)  
<div id="includedContent"></div> 
4

1 回答 1

0

我认为您的问题可以通过ajax解决

<script>(a.html)
$(document).ready(function(){
       $.ajax({
              type: "POST",
              url: '/templates/default/property/tab.html',
                          //or b.html 
              data: form_field,
              success: function(d){

                  $('#includedContent').html(d);
              },

          });

});
</script>
in html page (a.html)  
<div id="includedContent"></div> 
于 2013-09-06T07:27:48.613 回答