JSFiddle - React, Tailwind, and code Playground
by jonwang
HTML
<div style="position:absolute;top:150px;z-index:10;">
<input type="button" value="click" onclick="document.location.hash='test'" />
点击后按浏览器下的后退,前进按钮<br/>Press the browser Back and Forward buttons after clicked the button.
</div>
<div style="position:fixed;top:0;left:0;right:0;bottom:0">
<div id="aaaaaa" style="position:absolute;">
aaaaaaaaaaaaa<br />
aaaaaaaaaaaaa<br />
aaaaaaaaaaaaa<br />
</div>
</div>
JavaScript
window.onhashchange = function()
{
var obja = $('#aaaaaa');
if (obja.css('display')=='none')
{
obja.fadeIn();
}
else
{
obja.fadeOut();
}
};