Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
KonstantinImago

Java Script Меняющаяся шапка форума

Recommended Posts

Очень бы хотелось увидеть код или скрипт на яве, для смены шапки на форуме.

Перелазил все форумы, подходящих тем- нет. Помогите!

Share this post


Link to post
Share on other sites

Самый простой вариант, заносим имена банеров в массив и выводим функцией math.random случайный номер.

 

<script type="text/javascript">
ar[0] = "baner1.gif";
ar[1] = "baner2.gif";
ar[2] = "baner3.gif";
ar[3] = "baner4.gif";

document.getElementById('id_logo').src = '/images/baners/'+Math.round( ar[ Math.random()*4 ] );
</script>

  • Upvote 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...