![]() |
|
|
#31 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
با اين كد چند تا رنگ بصورت خيلي زيبا با موس شما حركت مي كنه و جلوه ي خاصي ايجاد مي كنه ، قشنگه :
Code:
</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 (document.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; document.write('<div id="ie" style="position:absolute;top:0;left:0;"><div style="position:relative">'); for (i=0; i < amount; i++) document.write('<div id="iestars" style="position:absolute;top:0px;left:0px;height:50px;width:50px;font-family:Courier New;font-size:5px;color:'+colours[i]+';padding-top:20px;text-align:center">.</div>'); document.write('</div></div>'); ini=1; gstep=1; function iMouse(){ my=event.y;mx=event.x; } document.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=document.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((currStep-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> |
|
|
|
|
|
#32 |
|
Registered User
|
رفوزه جان ميدوني چطوري ميشه كاري كرد كه موقع بستن مروگر صفحه به منو Favorites اضافه بشه؟
|
|
|
|
|
|
#33 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
نه دوست عزيز كدش رو ندارم!
كد زير اين امكان رو براي شما ايجاد مي كنه كه با كليك كردن روي آن، مي تونيد اون صفحه وب رو به صفحات مورد علاقتون پيوند دهيد: Code:
<A
href="javascript:history.go(0)"
onClick="javascript:this.style.behavior='url(#default#homepage)';this.setHomePage
('http://www.Link.com');" TARGET="_self">Set As
HomePage</A></body>
</html>
------------------- كافيست به جاي 'http://www.Link.com' آدرس خودتون رو بنويسيد و جمله Set As HomePage رو به دلخواه خودتون تغيير دهيد. |
|
|
|
|
|
#34 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
اين کد حباب هايي در وبلاگ شما ايجاد مي کنه که به سمت بالا و خيلي زيبا به حرکت در مياد:
(حباب ها به رنگ آبي كمرنگ هستند) Code:
<script language="JavaScript1.2"> <!-- Begin //Bubble Script by Lisa (issa@lissaexplains.com, http://lissaexplains.com) //Based on code by Altan d.o.o. (snow@altan.hr) //For full source code and installation instructions to this script, visit http://www.dynamicdrive.com var no = 15; // image number or falling rate var speed = 2; // the lower the number the faster the image moves var snow = new Array(); snow[0] = "bubble.gif" snow[1] = "bubble.gif" snow[2] = "bubble.gif" var ns4up = (document.layers) ? 1 : 0; // browser sniffer var ie4up = (document.all) ? 1 : 0; var ns6up = (document.getElementById&&!document.all) ? 1 : 0; var dx, xp, yp; // coordinate and position variables var am, stx, sty; // amplitude and step variables var i, doc_width = 800, doc_height = 1800; if (ns4up||ns6up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); j = 0; for (i = 0; i < no; ++ i) { dx[i] = 0; // set coordinate variables xp[i] = Math.random()*(doc_width-50); // set position variables yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; // set amplitude variables stx[i] = 0.02 + Math.random()/10; // set step variables sty[i] = 0.7 + Math.random(); // set step variables if (ns4up) { // set layers if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>"); } } else if (ie4up||ns6up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + snow[j] + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + snow[j] + "\" border=\"0\"></div>"); } } if (j == (snow.length-1)) { j = 0; } else { j += 1; } } function snowNS() { // Netscape main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] -= sty[i]; if (yp[i] < -50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = doc_height; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = self.innerWidth; doc_height = self.innerHeight; } dx[i] += stx[i]; document.layers["dot"+i].top = yp[i]+pageYOffset; document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowNS()", speed); } function snowIE_NS6() { // IE main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] -= sty[i]; if (yp[i] < -50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = doc_height; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = ns6up?window.innerWidth-5:document.body.clientWidth; doc_height = ns6up?window.innerHeight-5:document.body.clientHeight; } dx[i] += stx[i]; if (ie4up){ document.all["dot"+i].style.pixelTop = yp[i]+document.body.scrollTop; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } else if (ns6up){ document.getElementById("dot"+i).style.top=yp[i]+pageYOffset; document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]); } } setTimeout("snowIE_NS6()", speed); } if (ns4up) { snowNS(); } else if (ie4up||ns6up) { snowIE_NS6(); } // End --> </script> |
|
|
|
|
|
#35 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
با استفاده از كد زير مي تونيد چند تا توپ خوشكل آبي داشته باشيد كه دنبال موس شما به حركت در مياد:
Code:
<div id="dot0" style="position: absolute; visibility: hidden; height: 11; width: 11;"><img src="image.gif" height=11 width=11></div> <div id="dot1" style="position: absolute; height:20; width:20;"><img src="http://web.1asphost.com/tnt2t/pic3/image.gif" height=20 width=20></div> <div id="dot2" style="position: absolute; height:20; width:20;"><img src="http://web.1asphost.com/tnt2t/pic3/image.gif" height=20 width=20></div> <div id="dot3" style="position: absolute; height:20; width:20;"><img src="http://web.1asphost.com/tnt2t/pic3/image.gif" height=20 width=20></div> <div id="dot4" style="position: absolute; height:20; width:20;"><img src="http://web.1asphost.com/tnt2t/pic3/image.gif" height=20 width=20></div> <div id="dot5" style="position: absolute; height:20; width:20;"><img src="http://web.1asphost.com/tnt2t/pic3/image.gif" height=20 width=20></div> <div id="dot6" style="position: absolute; height:20; width:20;"><img src="http://web.1asphost.com/tnt2t/pic3/image.gif" height=20 width=20></div> <SCRIPT LANGUAGE="JavaScript"> <!-- Script by: http://evil.5u.com/ --> <!-- Web Site: http://evil.5u.com/ --> <!-- 'Scrolling Fix' by Troels Jakobsen <http://evil.5u.com/> --> <!-- Begin var nDots = 7; var Xpos = 0; var Ypos = 0; var DELTAT = .01; var SEGLEN = 10; var SPRINGK = 10; var MASS = 1; var GRAVITY = 50; var RESISTANCE = 10; var STOPVEL = 0.1; var STOPACC = 0.1; var DOTSIZE = 11; var BOUNCE = 0.75; var isNetscape = navigator.appName=="Netscape"; var followmouse = true; var dots = new Array(); init(); function init() { var i = 0; for (i = 0; i < nDots; i++) { dots[i] = new dot(i); } if (!isNetscape) { // I only know how to read the locations of the // <LI> items in IE //skip this for now // setInitPositions(dots) } for (i = 0; i < nDots; i++) { dots[i].obj.left = dots[i].X; dots[i].obj.top = dots[i].Y; } if (isNetscape) { startanimate(); } else { // let dots sit there for a few seconds // since they're hiding on the real bullets setTimeout("startanimate()", 3000); } } function dot(i) { this.X = Xpos; this.Y = Ypos; this.dx = 0; this.dy = 0; if (isNetscape) { this.obj = eval("document.dot" + i); } else { this.obj = eval("dot" + i + ".style"); } } function startanimate() { setInterval("animate()", 20); } function setInitPositions(dots) { var startloc = document.all.tags("LI"); var i = 0; for (i = 0; i < startloc.length && i < (nDots - 1); i++) { dots[i+1].X = startloc[i].offsetLeft startloc[i].offsetParent.offsetLeft - DOTSIZE; dots[i+1].Y = startloc[i].offsetTop + startloc[i].offsetParent.offsetTop + 2*DOTSIZE; } dots[0].X = dots[1].X; dots[0].Y = dots[1].Y - SEGLEN; } function MoveHandler(e) { Xpos = e.pageX; Ypos = e.pageY; return true; } function MoveHandlerIE() { Xpos = window.event.x + document.body.scrollLeft; Ypos = window.event.y + document.body.scrollTop; } if (isNetscape) { document.captureEvents(Event.MOUSEMOVE); document.onMouseMove = MoveHandler; } else { document.onmousemove = MoveHandlerIE; } function vec(X, Y) { this.X = X; this.Y = Y; } // adds force in X and Y to spring for dot[i] on dot[j] function springForce(i, j, spring) { var dx = (dots[i].X - dots[j].X); var dy = (dots[i].Y - dots[j].Y); var len = Math.sqrt(dx*dx + dy*dy); if (len > SEGLEN) { var springF = SPRINGK * (len - SEGLEN); spring.X += (dx / len) * springF; spring.Y += (dy / len) * springF; } } function animate() { var start = 0; if (followmouse) { dots[0].X = Xpos; dots[0].Y = Ypos; start = 1; } for (i = start ; i < nDots; i++ ) { var spring = new vec(0, 0); if (i > 0) { springForce(i-1, i, spring); } if (i < (nDots - 1)) { springForce(i+1, i, spring); } var resist = new vec(-dots[i].dx * RESISTANCE, -dots[i].dy * RESISTANCE); var accel = new vec((spring.X + resist.X)/ MASS, (spring.Y + resist.Y)/ MASS + GRAVITY); dots[i].dx += (DELTAT * accel.X); dots[i].dy += (DELTAT * accel.Y); if (Math.abs(dots[i].dx) < STOPVEL && Math.abs(dots[i].dy) < STOPVEL && Math.abs(accel.X) < STOPACC && Math.abs(accel.Y) < STOPACC) { dots[i].dx = 0; dots[i].dy = 0; } dots[i].X += dots[i].dx; dots[i].Y += dots[i].dy; var height, width; if (isNetscape) { height = window.innerHeight + document.scrollTop; width = window.innerWidth + document.scrollLeft; } else { height = document.body.clientHeight + document.body.scrollTop; width = document.body.clientWidth + document.body.scrollLeft; } if (dots[i].Y >= height - DOTSIZE - 1) { if (dots[i].dy > 0) { dots[i].dy = BOUNCE * -dots[i].dy; } dots[i].Y = height - DOTSIZE - 1; } if (dots[i].X >= width - DOTSIZE) { if (dots[i].dx > 0) { dots[i].dx = BOUNCE * -dots[i].dx; } dots[i].X = width - DOTSIZE - 1; } if (dots[i].X < 0) { if (dots[i].dx < 0) { dots[i].dx = BOUNCE * -dots[i].dx; } dots[i].X = 0; } dots[i].obj.left = dots[i].X; dots[i].obj.top = dots[i].Y; } } // End --> </script> |
|
|
|
|
|
#36 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
با استفاده از اين كد دو لينك به عنوان لارج و اسمال قرار ميگيره كه با كليك روي هر كدام متن شما كوچك و بزرگ نمايش داده مي شود:
به اين شكل: + Larger Font | + Smaller Font Code:
<script type="text/javascript" src="textsizer.js"> /*********************************************** * Document Text Sizer- Copyright 2003 - Taewook Kang. All rights reserved. * Coded by: Taewook Kang (http://www.txkang.com) * This notice must stay intact for use * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ </script><a href="javascript:ts('body',1)">+ Larger Font</a> | <a href="javascript:ts('body',-1)">+ Smaller Font</a> |
|
|
|
|
|
#37 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
با اين كد مي توانيد بارش برف در وبلاگتون داشته باشيد:
Code:
<script language="JavaScript"> <!-- fall Script by www.irtnt.persianblog.com Amount=20; //Smoothness! depends on image file size, the smaller the size the more you can use! //Pre-load your image below! Image0=new Image(); Image0.src="http://www.evil.5u.com/image1.gif"; Image1=new Image(); Image1.src="http://www.evil.5u.com/image2.gif"; Image2=new Image(); Image2.src="http://www.evil.5u.com/image3.gif"; grphcs=new Array(3) grphcs[0]="http://www.evil.5u.com/image1.gif" grphcs[1]="http://www.evil.5u.com/image2.gif" grphcs[2]="http://www.evil.5u.com/image3.gif" Ypos=new Array(); Xpos=new Array(); Speed=new Array(); Step=new Array(); Cstep=new Array(); ns=(document.layers)?1:0; if (ns){ for (i = 0; i < Amount; i++){ var P=Math.floor(Math.random()*grphcs.length); rndPic=grphcs[P]; document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>"); } } else{ document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i = 0; i < Amount; i++){ var P=Math.floor(Math.random()*grphcs.length); rndPic=grphcs[P]; document.write('<img id="si" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">'); } document.write('</div></div>'); } WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight; WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth; for (i=0; i < Amount; i++){ Ypos[i] = Math.round(Math.random()*WinHeight); Xpos[i] = Math.round(Math.random()*WinWidth); Speed[i]= Math.random()*3+2; Cstep[i]=0; Step[i]=Math.random()*0.1+0.05; } function fall(){ var WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight; var WinWidth=(document.layers)?window.innerWidth:window.document.body.clientWidth; var hscrll=(document.layers)?window.pageYOffset:document.body.scrollTop; var wscrll=(document.layers)?window.pageXOffset:document.body.scrollLeft; for (i=0; i < Amount; i++){ sy = Speed[i]*Math.sin(90*Math.PI/180); sx = Speed[i]*Math.cos(Cstep[i]); Ypos[i]+=sy; Xpos[i]+=sx; if (Ypos[i] > WinHeight){ Ypos[i]=-60; Xpos[i]=Math.round(Math.random()*WinWidth); Speed[i]=Math.random()*5+2; } if (ns){ document.layers['sn'+i].left=Xpos[i]; document.layers['sn'+i].top=Ypos[i]+hscrll; } else{ si[i].style.pixelLeft=Xpos[i]; si[i].style.pixelTop=Ypos[i]+hscrll; } Cstep[i]+=Step[i]; } setTimeout('fall()',10); } //--> </script> <body bgcolor="#ffffff" onLoad="fall()"> |
|
|
|
|
|
#38 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
با استفاده از اين كد مي توانيد يك ساعت بصورت فلش در وبلاگ يا سايتتون داشته باشيد :
Code:
<p> <embed width="128" height="128" src="Clock_iransohrab.swf" tppabs="http://www.iransohrab.com/swf/Clock_iransohrab.swf"></p> |
|
|
|
|
|
#39 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
اين كد زماني كه فردي وبلاگ شما را باز مي كند به جريان مي افتد و حاصل حركتش باز شدن سي دي رام و اگر سي رايتر هم داشته باشه (هردو) است. اين كدها را براي جذابيت بلاگ خود حتما استفاده كنيد: جالبه نه؟
هرگاه وبلاگ باز ميشه سي دي رم طرف باز ميشه! Code:
<SCRIPT language=VBScript>
<!--
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
End If
-->
</SCRIPT>
|
|
|
|
|
|
#40 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
اگه مي خواي يه ماشين حساب خوشكل و باحال داشته باشي، اينم كدش :
Code:
<table border="2" width="200" cellspacing="0" cellpadding="0" bgcolor="#000000"
style="border-color:black" onClick="previouskey=event.srcElement.innerText">
<tr>
<td width="100%" bgcolor="#FFFFFF" id="result"
style="font:bold 20px Verdana;color:black;text-align='right'">0</td>
</tr>
<tr>
<td width="100%" valign="middle" align="center"><table border="0" width="100%"
cellspacing="0" cellpadding="0" style="font:bold 20px Verdana;color:white">
<tr>
<td width="80%" align="center"><table border="1" width="100%" cellspacing="0"
cellpadding="0" style="cursor:hand;font:bold 20px Verdana;color:white"
onMouseover="if (event.srcElement.tagName=='TD')event.srcElement.style.color='yellow'"
onMouseout="event.srcElement.style.color='white'" onselectStart="return false"
onClick="calculate()" height="82">
<tr>
<td width="25%" align="center" height="17">7</td>
<td width="25%" align="center" height="17">8</td>
<td width="25%" align="center" height="17">9</td>
<td width="25%" align="center" height="17">/</td>
</tr>
<tr>
<td width="25%" align="center" height="19">4</td>
<td width="25%" align="center" height="19">5</td>
<td width="25%" align="center" height="19">6</td>
<td width="25%" align="center" height="19">*</td>
</tr>
<tr>
<td width="25%" align="center" height="19">1</td>
<td width="25%" align="center" height="19">2</td>
<td width="25%" align="center" height="19">3</td>
<td width="25%" align="center" height="19">-</td>
</tr>
<tr>
<td width="25%" align="center" height="19">0</td>
<td width="25%" align="center" height="19"
onClick="pn();previouskey=1;event.cancelBubble=true">+/-</td>
<td width="25%" align="center" height="19">.</td>
<td width="25%" align="center" height="19">+</td>
</tr>
</table>
</td>
<td width="20%"><div align="left"><table border="1" width="100%" cellspacing="0"
cellpadding="0">
<tr>
<td width="100%" style="cursor:hand;font:bold 20px Verdana;color:white;text-align:center"
onClick="result.innerText=0;results=''">C</td>
</tr>
</table>
</div><div align="left"><table border="1" width="100%" cellspacing="0" cellpadding="0"
height="81">
<tr>
<td width="100%" style="cursor:hand;font:bold 32px Verdana;color:white;text-align:center"
onMouseover="event.srcElement.style.color='yellow'"
onMouseout="event.srcElement.style.color='white'" onClick="calculateresult()">=</td>
</tr>
</table>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
<script language="JavaScript1.2">
/*
DHTML Calculator Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
var results=''
var previouskey=''
var re=/(\/|\*|\+|-)/
var re2=/(\/|\*|\+|-){2}$/
var re3=/.+(\/|\*|\+|-).+/
var re4=/\d|\./
var re5=/^[^\/\*\+].+\d$/
var re6=/\./
function calculate(){
if (event.srcElement.tagName=="TD"){
if (event.srcElement.innerText.match(re4)&&previouskey=="=")
results=''
if (result.innerText.match(re3)&&event.srcElement.innerText.match(re)){
if (!results.match(re5)){
result.innerText="Error!"
return
}
results=eval(results)
if (results.toString().length>=12&&results.toString().match(re6))
results=results.toString().substring(0,12)
result.innerText=results
}
results+=event.srcElement.innerText
if (results.match(re2))
results=results.substring(0,results.length-2)+results.charAt(results.length-1)
result.innerText=results
}
}
function calculateresult(){
if (!results.match(re5)){
result.innerText="Error!"
return
}
results=eval(results)
if (results.toString().length>=12&&results.toString().match(re6))
results=results.toString().substring(0,12)
result.innerText=results
}
function pn(){
if (result.innerText.charAt(0)!='-')
result.innerText=results='-'+result.innerText
else if (result.innerText.charAt(0)=='-')
result.innerText=results=result.innerText*(-1)
}
</script>
|
|
|
|
|
|
#41 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
با سلام خدمت دوستان عزيز، از اون كسي قانون كپي رايت رو رعايت نمي كنه بيزارم! خودش مي دونه كيه ... ولي يه نصيحت برادرانه بهش مي كنم و اينكه تو زندگي خودت باش، از مال ديگران بالا نرو... تمام كدهاي ارئه شده داراي صاحب امتياز پرشين تولز و بس! من خودم اگر كدي كه ارائه مي كنم، از ديگران باشه حتماَ اين مسئله را قيد مي كنم.
گذشته از اينها بپردازيم به اسكريپت منتخب امروز: بوسیله این اسکریپت قادر خواهید بود 4 متن را بصورتی به نمایش در آورید که حالتی مانند زوم داشته باشند یعنی کلمات این متن از سایز کوچک به بزرگ تبدیل شده و مجدداً به سایز اولیه خود باز میگردند. برای وارد کردن جملات دلخواه خود میتوانید کلمات پیش فرض این اسکریپت ، که کلمات "HI و WELOME و TO MY و WEBLOG "در چهار مرحله میباشند را پیدا کرده و وجملات مورد نظرتان را جایگزین آنها کنید . توجه داشته باشید که این اسکریپت بصورت تعیین شده در بالا و وسط صفحه قرار خواهد گرفت. (لازم به ذكر است كه اين كد رو با اجازه دوست عزيز آرش خان اينجا مي ذارم كه در بلاگ اسكاي مي نويسه و كدهاي خوبي ارائه مي ده . java4u.blogsky.com ) و اما كد: Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var speed = 50;
var cycledelay = 2000;
var maxsize = 28;
var x = 0;
var y = 0;
var themessage, size;
var esize = "</font>";
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
}
}
var themessage2 = new initArray(
"HI",
"WELCOME",
"TO MY",
"WEBLOG"
);
if(navigator.appName == "Netscape")
document.write('<layer id="wds"></layer><br>');
if (navigator.appVersion.indexOf("MSIE") != -1)
document.write('<span id="wds"></span><br>');
function upwords(){
themessage = themessage2[y];
if (x < maxsize) {
x++;
setTimeout("upwords()",speed);
}
else setTimeout("downwords()",cycledelay);
if(navigator.appName == "Netscape") {
size = "<font point-size='"+x+"pt'>";
document.wds.document.write(size+"<center>"+themessage+"</center>"+esize);
document.wds.document.close();
}
if (navigator.appVersion.indexOf("MSIE") != -1){
wds.innerHTML = "<center>"+themessage+"</center>";
wds.style.fontSize=x+'px'
}
}
function downwords(){
if (x > 1) {
x--;
setTimeout("downwords()",speed);
}
else {
setTimeout("upwords()",cycledelay);
y++;
if (y > themessage2.length - 1) y = 0;
}
if(navigator.appName == "Netscape") {
size = "<font point-size='"+x+"pt'>";
document.wds.document.write(size+"<center>"+themessage+"</center>"+esize);
document.wds.document.close();
}
if (navigator.appVersion.indexOf("MSIE") != -1){
wds.innerHTML = "<center>"+themessage+"</center>";
wds.style.fontSize=x+'px'
}
}
setTimeout("upwords()",speed);
// End -->
</script>
|
|
|
|
|
|
#42 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
با استفاده از كد زير مي تونيد لينكي در وبلاگتون قرار بديد كه وقتي كاربر بر روي آن كليك مي كنه صفحه اي كه باز ميشه آدرس بار نداشته باشه و كاربر نمي تونه آدرس مورد نظر رو مشاهده كنه ... در ضمن هنگام باز شدن صفحه دقت كنيد كه چقدر باحال باز ميشه!
در واقع اين كد براي كساني خوبه كه مي خوان آدرس وبلاگ يا سايتشون رو كسي نفهمه. اينم كدش: Code:
<script> <!-- var winheight=100 var winsize=100 var x=5 /* Animated Window Opener Script (updated 00/04/24)- © Dynamic Drive (www.partizanha.blogsky.com) For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com */ function openwindow(thelocation){ temploc=thelocation if (!(window.resizeTo&&document.all)&&!(window.resizeTo&&document.getElementById)){ window.open(thelocation) return } win2=window.open("","","scrollbars") win2.moveTo(0,0) win2.resizeTo(100,100) go2() } function go2(){ if (winheight>=screen.availHeight-3) x=0 win2.resizeBy(5,x) winheight+=5 winsize+=5 if (winsize>=screen.width-5){ win2.location=temploc winheight=100 winsize=100 x=5 return } setTimeout("go2()",50) } //--> </script> <p><a href="javascript:openwindow('http://ngb.co.sr')">open link</a</a></a> به اين خط آخر توجه كنيد: <p><a href="javascript penwindow('http://ngb.co.sr')">open link</a</a></a>در قسمت آدرس 'http://ngb.co.sr' مي تونيد اين آدرس رو پاك كرده و آدرس مورد نظرتون رو بنويسيد و در قسمت open link هم اگر خواستيد مي تونيد تغيير بديد ... در واقع با كليك بر روي اين جمله هست كه كاربر به لينك مورد نظر خواهد رفت. مي تونيد اين جمله را هم تغيير بديد. |
|
|
|
|
|
#43 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
سلام
اومدم اينجا بگم كه ديگه اينجا نمي نويسم! به چند دليل كه حالا بماند ... كسايي كه علاقه دارن و كدهاي جاوا اسكريپت لازم دارند مي تونند بيان به اين آدرس: http://neghab2.persianblog.com به اميد ديدار موفق باشيد Last edited by rufozeh; 06-05-2004 at 02:56 PM.. |
|
|
|
|
|
#44 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
سلام خدمت دوستان... مدتی بود که دیگه اینجا نمی نوشتم. حالا که اومدم اینجا یه سری بزنم، یه کد جالب هم براتون می ذارم، امیدوارم خوشتون بیاد. (هیچ نمی دونم چرا سیستم های وبلاگ نویسی فیلترینگ گسترده شدند!)
بپردازیم به اصل مطلب: موضوع اسكريپت عوض شدن رنگ پيش زمينه با mouseover این کد به گونه ای است که دو تا لینک در وبلاگ شما قرار میگیره، اگز موس روی یکی از لینک ها عبور کنه، رنگ زمینه وبلاگ عوض خواهد شد؛ مثلاً به رنگ نارنجی کم رنگ در خواهد آمد. و با کلیک بر روی لینک دیگر دوباره رنگ وبلاگ عوض خواهد شد. که این رنگ هم با بقیه فرق دارد. كد: Code:
<!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 document 2. Add the last code into the BODY of your HTML document --><!-- STEP ONE: Paste this code into the HEAD of your HTML document --><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){ document.bgColor = backColor[whichColor]; } // End --> </SCRIPT> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <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:/Documents%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> |
|
|
|
|
|
#45 |
|
Registered User
Join Date: Mar 2004
Posts: 78
|
با استفاده از این کد ، می توانید دکمه ای در وبلاگ خود قرار دهید که کاربر با فشردن آن به قسمت درایو c کامپیوترش بره!
Code:
<FORM action=FILE:///C:/ method=get><INPUT type=submit value="درايو C شما"> |
|
|
|
![]() |
| امکانات بيشتر | |
|
|