<script>
function show2(iAdd) {
window.location.hash=iAdd;
show1();
}
function show1() {
var iHash=window.location.hash;
if (iHash.indexOf('picAll',0)!=-1) {
}
else if (iHash.indexOf('pic1',0)!=-1) {
document.getElementById('hpic2').style.display = "none";
document.getElementById('hpic3').style.display = "none";
}
else if (iHash.indexOf('pic2',0)!=-1) {
document.getElementById('hpic1').style.display = "none";
document.getElementById('hpic3').style.display = "none";
}
else if (iHash.indexOf('pic3',0)!=-1) {
document.getElementById('hpic1').style.display = "none";
document.getElementById('hpic2').style.display = "none";
}
else {
alert('Can not find pic');
}
document.getElementById('myBody').style.display = "block";
};
</script>
</head>
<body id="myBody" onload="show1()" style="display:none">
<div id="hpic1"><a href="" onclick="show2('pic1')"><div ><img src="../img_left/Small/pic1.png"></a>
</div>
<div id="hpic2"><a href="" onclick="show2('pic2')"><div ><img src="../img_left/Small/pic2.png"></a>
</div>
<div id="hpic3"><a href="" onclick="show2('pic3')"><div ><img src="../img_left/Small/pic3.png"></a>
</div>
</body>
запуск сайта : index.html#picAll
или
index.html#pic2
как то так
|