Foruma sadaļu aplūko
|
|
|
H[o_0]LiGaN
|
|
|
VECĀ MIESA
Foruma ieraksti: 827
UWM Reputācija:
|
uWEBMEISTARS ordeņi:
1. līmenis
2. līmenis
3. līmenis
Jaunākie apbalvojumi:
|
@H[o_0]LiGaN raksta .. :
Tev vajag to paslēpt ar hide
Vienā angļu forumā atradu šo: Quote This will get you started in between your tags put this java script in Code <script language=javascript type='text/javascript'> function hidediv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hideShow').style.visibility = 'hidden'; } else { if (document.layers) { // Netscape 4 document.hideShow.visibility = 'hidden'; } else { // IE 4 document.all.hideShow.style.visibility = 'hidden'; } } }
function showdiv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hideShow').style.visibility = 'visible'; } else { if (document.layers) { // Netscape 4 document.hideShow.visibility = 'visible'; } else { // IE 4 document.all.hideShow.style.visibility = 'visible'; } } } </script> As you can see it gets the div ID for each of the browsers and hides it or shows it. I named the div Id hideShow to make it easy for you. Then in your document put in your div element the id name hideShow you can change this of course Code <div id="hideShow" ..etc> My content </div> and this to call the javascript to hide it Code <a href="javascript:hidediv()">hide div</a> and this to show it Code <a href="javascript:showdiv()">show div</a> That simple regards, Mark
[p.s.]Ar Angļu valodu nedraudzējos, tāpēc textu starp kodien netulkoju. :)[/p.s.]
|
|
|
|
|
|