موضوع اسكريپت عوض شدن رنگ پيش زمينه با mouseover
این کد به گونه ای است که دو تا لینک در وبلاگ شما قرار میگیره، اگز موس روی یکی از لینک ها عبور کنه، رنگ زمینه وبلاگ عوض خواهد شد؛ مثلاً به رنگ نارنجی کم رنگ در خواهد آمد. و با کلیک بر روی لینک دیگر دوباره رنگ وبلاگ عوض خواهد شد. که این رنگ هم با بقیه فرق دارد
کد:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- TWO STEPS TO INSTALL BACKGROUND COLOR-CHANGE:
1. Copy the coding into the HEAD of your HTML doent
2. Add the last code into the BODY of your HTML doent --><!-- STEP ONE: Paste this code into the HEAD of your HTML doent --><HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1256">
<SCRIPT language=JavaScript>
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://www.partizanha.blogsky.com -->
<!-- Begin
// Copyright 2001 by www.partizanha.blogsky.com
// Please do *not* remove this notice.
var backColor = new Array(); // don't change this
// Enter the colors you wish to use. Follow the
// pattern to use more colors. The number in the
// brackets [] is the number you will use in the
// function call to pick each color.
backColor[0] = '#FF0000';
backColor[1] = 'CC,FF,FF';
backColor[2] = 'FF,D6,C1';
backColor[3] = '#FFFFFF';
// Do not edit below this line.
function changeBG(whichColor){
doent.bgColor = backColor[whichColor];
}
// End -->
</SCRIPT>
<!-- STEP TWO: Copy this code into the BODY of your HTML doent -->
<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY><span style="background-color: #FFD6C1"><!--
Example One -- changing bg color with mouseOver.
Set the number in the () in the changeBG() function
to the number of the color in the brackets in the
backColor[] array to select a given color.
//--></span><A onmouseover=javascript:changeBG(2)
href="file:///C:/Doents%20and%20Settings/B.Zarabian/Desktop/g.html#">Change
by placing mouse over link</A> <!--
Example Two -- changing bg color with a mouse click.
Set the number in the () in the changeBG() function
to the number of the color in the brackets in the
backColor[] array to select a given color.
//--><A href="javascript:changeBG(1)">Change by clicking on link</A>
</BODY></HTML>
علاقه مندی ها (بوک مارک ها)