simple question but i cant find an answer for this… how can i refresh a content of a div or span?
thanks for the help!
simple question but i cant find an answer for this… how can i refresh a content of a div or span?
thanks for the help!
more detail.
<div id = “mydiv”>
some content here
</div>
<a href=“javascript:void(0)” onclick=“refreshdiv()”>click me</a>
i wanna refresh the content of “mydiv”
There is a javascript forum for javascript questions.
function refreshdiv() {
document.getElementById('mydiv').innerHTML = 'http://www.sitepoint.com/forums/forumdisplay.php?f=15';
}
Refresh it with what? Content from a database? An image?
More details, please.
using e.g. jquery
<div id="mydiv"></div>
<a id="refresh">click</a>
<script>
$(function() {
$("#refresh").click(function() {
$("#mydiv").load("http://blah.com/page.php")
})
})
</script>