А точнее не понимает вот эту строчку var h = document.getElementById(obj).clientHeight-5;
<html> <head> <script type="text/javascript"> var idinterval; var saveH; var obj; var t = 0; function sh(v){ if(t == 0){ saveH = document.getElementById(v).clientHeight; obj = v; idinterval = setInterval("h()", 10); t = 1; }else if(t == 1){ obj = v; idinterval = setInterval("s()", 10); t = 0; } } function h(){ var h = document.getElementById(obj).clientHeight-5; document.getElementById(obj).style.height = h+'px' if(h < 0){ document.getElementById(obj).style.display = 'none'; clearInterval(idinterval); } } function s(){ document.getElementById(obj).style.display = 'block'; var h = document.getElementById(obj).clientHeight+5; document.getElementById(obj).style.height = h+'px' if(h == saveH){ clearInterval(idinterval); } } </script> </head> <body> <div id="demo"> <a id="slideout" href="java script: sh('test')">slideout</a> <div id="test" style="overflow:hidden; border: solid 1px #000; background: #fcfcfc;"> text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text </div> </div> </body> </html>
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Здравствуйте, подскажите какой тег использовать для увеличения значения, пример на картинке.
Вроде, про такой тег я слышала. Если есть тег прогресс бар, значит и такое должно быть.
Question
chus
Сижу уже три часа в ИЕ отказываеться работать =(
А точнее не понимает вот эту строчку var h = document.getElementById(obj).clientHeight-5;
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.