Skip to content

Instantly share code, notes, and snippets.

@oogatta
Created December 19, 2012 11:35
Show Gist options
  • Save oogatta/4336088 to your computer and use it in GitHub Desktop.
Save oogatta/4336088 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
</head>
<body onload="document.getElementById('test').innerHTML='JS time:'+(new Date()).toString();">
<?php
echo "PHP time:" . date("Y/m/d g:i:s");
?>
<p id="test"></p>
<p><a href="modoru.php">traverse</a></p>
<script type="text/javascript">
var kido = {
ibuki : null
};
window.onpageshow = function(evt) {
if ( evt.persisted ) {
alert("yay! bfcache!");
}
};
</script>
<button onclick="kido.ibuki='wow'">set</button>
<button onclick="alert(kido.ibuki);">alert</button>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment