Trying to use setInterval() but error occurs
<p>I'm trying to load testdata.php and automatically refresh every 10 seconds. But it doesn't work. What's wrong with my code? I'm still new at web programming so please bear with me    </p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0   /jquery.min.js"&gt;
$( "#data" ).load( "http://localhost/testdata.php" );
&lt;/script&gt;    
&lt;/head&gt;

&lt;body&gt;

&lt;div id="data"&gt;&lt;/div&gt;    

&lt;/body&gt;
window.setInterval(function(){
/// call your function here
}, 10000);      
&lt;/html&gt;
</code></pre>