我已:
<script language="javascript">
function arata(temp) {
var req = new XMLHttpRequest();
req.open("GET", temp, false);
req.send(null);
var page = req.responseText;
document.getElementById("produs").innerHTML = page;
}
</script>
并且
<a href="#produs" onclick="arata( facturaies_vezi.php?nrfacties=<?=$row[nrfacties];?>#produs ); return true;" id="<?=$nrcrt;?>">See details</a>
并且
<div id="produs"></div>
So, when the link is clicked, the page loads in to div.
How can I do to align the top of div to the top of the viewpoint? I mean... something like using an #anchor.