طريقه ايجاد افكت Glow براي متن نوشته شده :
کد:<p><font face="Tahoma">
<span style="FILTER: glow(Color=#50710,Strength=2); WIDTH: 1px; HEIGHT: 1px">
<font face="Tahoma" color="#ffff00" style="font-size:15pt">welcome</font></span></font></p>
Printable View
طريقه ايجاد افكت Glow براي متن نوشته شده :
کد:<p><font face="Tahoma">
<span style="FILTER: glow(Color=#50710,Strength=2); WIDTH: 1px; HEIGHT: 1px">
<font face="Tahoma" color="#ffff00" style="font-size:15pt">welcome</font></span></font></p>
متن سايه دار
کد:<html>
<head>
<title>New Page 1</title>
<script type = "TEXT/JAVASCRIPT" LANGUAGE = "JAVASCRIPT">
function doShadow(newDiretction){
if (doent.all && newDiretction < 360) {
newDiretction += 10
doent.all.dropText.style.filter="shadow(directi on=" +
newDiretction + ")"
setTimeout("doShadow(" + newDiretction + ")" , 100)
}
}
</script>
<STYLE TYPE="TEXT/CSS">
#dropText {width: 500px; height: 100px; font-size: 36px; filter:
shadow(direction=90)}
</STYLE>
</head>
<body>
<DIV ID="dropText">
به وبلاگ من خوش آمديد
</DIV>
</body>
</html>
انتخاب رنگ پس زمينه
کد:<body>
<script language="Javascript">
<!--
// please keep these lines on when you copy the source
// made by: Amir - http://www.IranJavaScript.com
function backbs(clr) {
doent.bgColor = clr
}
<!--Template Name:"Asre Jadid"-By:Amin Asemi E.For Persianblog's blog-->
//-->
</script>
<form>
<input type="button" value="zard" onclick="backbs('yellow')">
<input type="button" value="khaki" onclick="backbs('khaki')">
<input type="button" value="sefid" onclick="backbs('white')">
<input type="button" value="toosi" onclick="backbs('gray')">
<input type="button" value="meshki" onclick="backbs('black')">
<input type="button" value="soorati" onclick="backbs('pink')">
<input type="button" value="abi" onclick="backbs('blue')">
<input type="button" value="sabz" onclick="backbs('Green')">
<input type="button" value="noghre ei" onclick="backbs('silver')">
<input type="button" value="sabz tire" onclick="backbs('teal')">
<input type="button" value="limooei" onclick="backbs('lime')">
<input type="button" value="abi nafti" onclick="backbs('navy')">
<input type="button" value="ghermez" onclick="backbs('red')">
<input type="button" value="narenji" onclick="backbs('orange')">
<input type="button" value="ghahve ei" onclick="backbs('olive')">
<input type="button" value="banafsh" onclick="backbs('purple')">
</form>
</script>
</body>
با انجام عمل Double Click عمل خاصي را مشاهده خواهيد كرد
براي عمل onDbclick Event
onDblclick="newWindow(1)"
بدين صورت با دوبار کليک بر روي تصوير کوچک, تصوير بزرگ آن در پنجره جديد نمايش داده ميشود.
کد:
<html>
<head>
<script language="javascript" type="text/javascript">
function newWindow(imgNumber) {
imgName = "images/test" + imgNumber + ".gif"
imgWindow = window.open(imgName,"imgWin","width=320,height=240 ,scrollbars=no")
}
</script>
</head>
<body>
<h2>Double-click on an image to see the full-size version</h2>
<img src="images/test1.gif" border="2" onDblclick="newWindow(1)">
<img src="images/test2.gif" border="2" onDblclick="newWindow(2)">
<img src="images/test3.gif" border="2" onDblclick="newWindow(3)">
</body>
</html>
پيام هنگام ورود به صفحه
کد:<html>
<head>
<script language="javascript" type="text/javascript">
alert("Welcome to my weblog")
</script>
</head>
<body>
<h1>
<!-- hide script from old browsers -->
<!--this is on example of a long JavaScript comment-->
<script language="javascript" type="text/javascript">
doent.write("IranJavaScript")
//end hiding script from old browsers -->
</script>
</h1>
</body>
</html>
اين کد فونت های مختلف داره ، می تونید نوشته ها رو خودتون تغییر بدید.
کد:<script>
var divs = new Array();
var da = doent.all;
var start;
//CONFIGUER THESE VARS!!!!!!
//speed of pulsing
var speed = 50;
function initVars(){
if (!doent.all)
return
//Extend of shrink the below list all you want
//put an "addDiv(1,"2",3,4); for each div you made,
//1)'id' of div
//2)color or glow(name or hex)(in quotes!!!)
//3)minimum strength
//4)maximum strength
addDiv(hi,"lime",2,11);
addDiv(welcome,"red",4,9);
addDiv(message,"purple",2,4);
addDiv(msg2,"orange",15,17);
addDiv(msg3,"blue",1,3);
addDiv(msg4,"pink",1,3);
//NO MORE EDITING!!!!!!
startGlow();
}
function addDiv(id,color,min,max)
{
var j = divs.length;
divs[j] = new Array(5);
divs[j][0] = id;
divs[j][1] = color;
divs[j][2] = min;
divs[j][3] = max;
divs[j][4] = true;
}
function startGlow()
{
if (!doent.all)
return 0;
for(var i=0;i<divs.length;i++)
{
divs[i][0].style.filter = "Glow(Color=" + divs[i][1] + ", Strength=" + divs[i][2] + ")";
divs[i][0].style.width = "100%";
}
start = setInterval('update()',speed);
}
function update()
{
for (var i=0;i<divs.length;i++)
{
if (divs[i][4])
{
divs[i][0].filters.Glow.Strength++;
if (divs[i][0].filters.Glow.Strength == divs[i][3])
divs[i][4] = false;
}
if (!divs[i][4])
{
divs[i][0].filters.Glow.Strength--;
if (divs[i][0].filters.Glow.Strength == divs[i][2])
divs[i][4] = true;
}
}
}
-->
</script>
<body onLoad="initVars()">
<div id="hi" style="color: lime">
Hello!
</div>
<br>
<div id="welcome" style="color: lime">
Welcome!
</div>
<br>
<div id="message" style="color: lime">
This is a pulsating message!
</div>
<br>
<div id="msg2" style="color: lime">
This is another pulsating message!
</div>
<br>
<div id="msg3" style="color: lime">
welcome my to weblog!
</div>
<br>
<div id="msg4" style="color: pink">
rufozeh !
</div>__________________
منو باز شو
کد:<html>
<head>
<title>First menu</title>
<style>
.curhand{cursor:hand}
</style>
<script language="javascript">
function displayit(paragraph,title,imgmenu){
if (doent.all[paragraph].style.display=='none')
{doent.all[paragraph].style.display="block";
doent.all[imgmenu].src="arrow_u2.jpg"}
else {doent.all[paragraph].style.display="none";
doent.all[imgmenu].src="arrow_d2.jpg"}
}
function setoverstyles(paragraph,imgmenu,title){
if (doent.all[paragraph].style.display=='none')
{doent.all[imgmenu].src="arrow_d2.jpg";
doent.all[title].style.textDecorationUnderline='true'}
else {doent.all[imgmenu].src="arrow_u2.jpg";
doent.all[title].style.textDecorationUnderline='true'}
}
function setoutstyles(paragraph,imgmenu,title){
if (doent.all[paragraph].style.display=='none')
{doent.all[title].style.textDecoration='none';
doent.all[imgmenu].src="arrow_d1.jpg"}
else {doent.all[imgmenu].src="arrow_u1.jpg";
doent.all[title].style.textDecoration='none'}
}
sw=0;
function displayall(){
if (sw==0) {swall.innerText="Hide all";doent.all['x'].style.display='block';sw=1;
for (i=1;i<=5;i++)
{ xmenu='menu'+i ; ximg='imgmenu'+i ;
if (doent.all[xmenu].style.display=='none')
{doent.all[xmenu].style.display="block";doent.all[ximg].src="arrow_u1.jpg"}}}
else {swall.innerText="Show all";doent.all['x'].style.display='none';sw=0;
for (i=1;i<=5;i++)
{xmenu='menu'+i;ximg='imgmenu'+i;
if (doent.all[xmenu].style.display=='block')
{doent.all[xmenu].style.display="none";doent.all[ximg].src="arrow_d1.jpg"}}}
}
function displayinline(text){
if (doent.all[text].style.display=="none"){doent.all[text].style.display="inline"}
else {doent.all[text].style.display="none"}
}
</script>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="598" height="28">
<p align="left">
<span id="swall" onmouseover="this.style.textDecorationUnderline='t rue'" onmouseout="this.style.textDecoration='none'" class="curhand" onclick="displayall()">
Show all</span></td>
<td width="93" height="28">
<p align="right">
</td>
</tr>
</table><br>
<p id='x' style="display:none"></p>
<div onmouseover="setoverstyles('menu1','imgmenu1','tit le1')" onmouseout="setoutstyles('menu1','imgmenu1','title 1')" class="curhand" onclick="displayit('menu1','title1','imgmenu1')" id="title1" style="position:static; width:83; height:19">
<img id="imgmenu1" border="0" src="arrow_d1.jpg" width="12" height="12">First
menu</div>
<blockquote>
<span id="menu1" style="display:none; width: 140">Item 1<br>
Item 2<br>
Item 3<br>
Itrm 4<br>
Item 5<br>
Item 6<br>
Item 7</span>
</blockquote>
<p></p>
<div onmouseover="setoverstyles('menu2','imgmenu2','tit le2')" onmouseout="setoutstyles('menu2','imgmenu2','title 2')" class="curhand" onclick="displayit('menu2','title2','imgmenu2')" id="title2" style="position:static; width:100; height:4">
<img id="imgmenu2" border="0" src="arrow_d1.jpg" width="12" height="12">Second
menu</div>
<p></p>
<blockquote>
<span id="menu2" style="display:none; width: 140">Item 1<br>
Item 2<br>
Item 3<br>
Item 4<br>
Item 5<br>
Item 6<br>
Item 7</span>
</blockquote>
<p></p>
<div onmouseover="setoverstyles('menu3','imgmenu3','tit le3')" onmouseout="setoutstyles('menu3','imgmenu3','title 3')" class="curhand" onclick="displayit('menu3','title3','imgmenu3')" id="title3" style="position:static; width:84; height:19">
<img id="imgmenu3" border="0" src="arrow_d1.jpg" width="12" height="12">Third
menu</div>
<p></p>
<blockquote>
<span id="menu3" style="display:none; width: 140">Item 1<br>
Item 2<br>
Item 3<br>
Item 4<br>
Item 5<br>
Item 5<br>
Item 6</span>
</blockquote>
<p></p>
<div onmouseover="setoverstyles('menu4','imgmenu4','tit le4')" onmouseout="setoutstyles('menu4','imgmenu4','title 4')" class="curhand" onclick="displayit('menu4','title4','imgmenu4');" id="title4" style="position:static; width:93; height:19">
<img id="imgmenu4" border="0" src="arrow_d1.jpg" width="12" height="12">Fourth
menu</div>
<p></p>
<blockquote>
<span id="menu4" style="display:none; width: 140">
Item 1<br>
Item 2<br>
Item 3<br>
Item 4<br>
Item 5<br>
Item 6</span>
</blockquote>
<p></p>
<div onmouseover="setoverstyles('menu5','imgmenu5','tit le5')" onmouseout="setoutstyles('menu5','imgmenu5','title 5')" class="curhand" onclick="displayit('menu5','title5','imgmenu5')" id="title5" style="position:static; width:80; height:19">
<img id="imgmenu5" border="0" src="arrow_d1.jpg" width="12" height="12">Fifth
menu</div>
<p></p>
<blockquote>
<span id="menu5" style="display:none; width: 140">
Item 1<br>
Item 1<br>
Item 2<br>
Item 3<br>
Item 4<br>
Item 5</span>
</blockquote>
</body>
</html>
طريقه ايجاد افكت Glow براي متن نوشته شده :
حالت Blur
کد:<p><font face="Tahoma">
<span style="FILTER: blur(Strength=10); WIDTH: 1px; HEIGHT: 1px">
<font face="Tahoma" color="#800000" style="font-size: 10pt">WELCOME</font></span></font></p>
با اين كد چند تا رنگ بصورت خيلي زيبا با موس شما حركت مي كنه و جلوه ي خاصي ايجاد مي كنه ، قشنگه :
کد:</h2>
</body>
</html>
<SCRIPT language=JavaScript>
<!-- Script by kurt.grigg@virgin.net
//adapté pour vos mails par Nollizua...le Site de Nollizua...http://www.nollizua.com
if (doent.all){
colours=new Array('00ff00','ffff00','ff0000','ff00ff','0000ff' ,'ee00ee','8470ff','FFBD08','DE2929')
amount=colours.length;
YgetDelay=0,XgetDelay=0,Ydelay=0,Xdelay=0,step=0.2 ,currStep=0,my=0,mx=0;
doent.write('<div id="ie" style="position:absolute;top:0;left:0;"><div style="position:relative">');
for (i=0; i < amount; i++)
doent.write('<div id="iestars" style="position:absolute;top:0px;left:0px;height:5 0px;width:50px;font-family:Courier New;font-size:5px;color:'+colours[i]+';padding-top:20px;text-align:center">.</div>');
doent.write('</div></div>');
ini=1;
gstep=1;
function iMouse(){
my=event.y;mx=event.x;
}
doent.onmousemove=iMouse
function dim(){
ini-=gstep;
dt=setTimeout('dim()',10);
if (ini < 2){
clearTimeout(dt);
glow();
}
}
function glow(){
ini+=gstep;
gt=setTimeout('glow()',10);
if (ini > 14){
clearTimeout(gt);
dim();
}
}
function stars(){
ie.style.top=doent.body.scrollTop;
for (i=0; i < amount; i++)
{
var layer=iestars[i].style;
layer.filter='glow(color='+colours[i]+', strength='+ini+')';
layer.top= Ydelay+100*Math.sin((5*Math.sin((currStep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
layer.left=Xdelay+180*Math.cos((5*Math.sin((currSt ep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
}
currStep+=step;
}
function delay(){
Ydelay = YgetDelay+=(my-YgetDelay)*1/20;
Xdelay = XgetDelay+=(mx-XgetDelay)*1/20;
stars();
setTimeout('delay()',10);
}
delay();
glow();
}
//-->
</SCRIPT>
با استفاده از اين كد مي توانيد يك ساعت بصورت فلش در وبلاگ يا سايتتون داشته باشيد :
کد:<p>
<embed width="128" height="128" src="Clock_iransohrab.swf" tppabs="http://www.iransohrab.com/swf/Clock_iransohrab.swf"></p>