jquery如何load目标页js动态生成的内容?load完以后#con里面应该有"hello"字样。是不是用那个$.getScript?怎么做才能load动态内容?index.htm代码:<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
function ajax_load(){
$("#con").load("data.htm #hello");
}
</script><div id="con">ajax contents</div>
<button onclick="ajax_load();">load</button>
data.htm代码:<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
function add_div(){
$("#hello").append(
"<div>hello</div>"
);
}
$(function(){
add_div();
});
</script><div id="hello"></div>