Как обновить страницу просмотра без обновления страницы в jquery.
Вот мой код. Пожалуйста, помогите его решить.
<html>
<head>
<Title>Just A Test</Title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
<script type="text/javascript">
var auto_refresh = setInterval(
function ()
{
$('#load_me').load('samp.jsp').fadeIn("slow");
}, 10000); // autorefresh the content of the div after
//every 10000 milliseconds(10sec)
</script>
</head>
<body>
<div id="load_me"> <%@ include file="samp.jsp" %></div>
</body>
/html>
Возможно, вы забыли выполнить свою функцию 'auto_refresh();' !
попробуй это:
<html>
<head>
<Title>Just A Test</Title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
<script type="text/javascript">
var auto_refresh = setInterval(function (){
$('#load_me').load('samp.jsp').fadeIn("slow");
}, 10000); // auto refresh the content of the div after
// every 10000 milliseconds(10sec)
auto_refresh();
</script>
</head>
<body>
<div id="load_me"> <%@ include file="samp.jsp" %></div>
</body>
</html>