Using this code, it cannot provide the last element of the story correctly, instead it displays undefined:
<input type="button" onclick="getHistoryLast()" value="test">
<script>
function getHistoryLast(){
var x=history.previous;
alert(x);
}
</script>
What is the correct code to get the last url of a story item?
Jamie source
share