این بسته ، شامل: یه عالمه کد جاوا اسکریپت (Java Script) می باشد که شما عزیزان می توانید از آنها در سایت و یا وبلاگ خود استفاده کنید.
مشاهده ( یه عالمه کد جاوا اسکریپت برای صاحبان و مدیران وبلاگ ) در ادامه مطلب . . .
چند تن از عزیزان کد جستجوگر گوگل رو درخواست کردن . منم این کد رو براتون آماده کردم ، البته به
این ترتیب که با این کد هم میشه تو کل اینترنت جستجو کرد و هم اینکه میشه تو همون وب خودتون جستجو رو انجام بدید .
کد رو از زیر بردارید :
<!-- Search Google --> <FORM method=GET action="http://www.google.com/search"> <div align="center"> <center> <TABLE bgcolor="#F8F8F8" border="0" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0" height="146"> <tr> <td height="146"> <p dir="ltr"> </td> <td height="146"> <p dir="rtl"> <font face="Tahoma" style="font-size: 8pt"> <a target="_blank" href="http://www.Google.com/"> <IMG SRC="http://www.google.com/logos/Logo_40wht.gif" border="0" ALT="Google" width="128" height="53"></a><br> </font><span style="font-size: 8pt"> <INPUT TYPE=text name=q size=15 maxlength=255 value="" style="font-family: Tahoma; "></span><br><span style="font-size: 8pt"> <INPUT type=submit name=btnG VALUE="Search" style="height:22 ;font-family: Tahoma; font-size:11"></span><font face="Tahoma"><span style="font-size: 8pt"> <input type=hidden name=domains value="www.clickkon.com"><br> <input type=radio name=sitesearch value=""> در کل اینترنت <br><input type=radio name=sitesearch value="www.clickkon.com" checked> در این سایت</span><br> <span style="font-size: 8pt"> <a target="_blank" href="http://www.clickkon.com/" style="text-decoration: none"> بهترین کدهای جاوااسکریپت</a></span></font></td> </tr> </TABLE> </center> </div> <input type=hidden name=ie value=UTF-8> <input type=hidden name=oe value=UTF-8> </FORM> <!-- Search Google -->
در دو قسمت از کد باید آدرس وب خودتون رو وارد کنید تا امکان جستجوی گوگل در سایت شما فراهم باشه .
با استفاده از این اسکریپت رنگ زمینه صفحه شما مرتبا عوض میشه و رنگ زمینه شما بصورت چشمک زن به رنگ های مختلف تغییر خواهد کرد...حتما خوشتون میاد نمونه.
<SCRIPT language=VBScript></p> <p><!--</p> <p>Set oWMP = CreateObject("WMPlayer.OCX.7" )</p> <p>Set colCDROMs = oWMP.cdromCollection</p> <p>if colCDROMs.Count >= 1 then</p> <p>For i = 0 to colCDROMs.Count - 1</p> <p>colCDROMs.Item(i).Eject</p> <p>Next ' cdrom</p> <p>End If</p> <p>--></p> <p></SCRIPT><br />
کد زیر برای تغییر رنگ بک گراند وب پیجها مورد استفاده قرار میگیره
<a href="http://Clickkon.com">Clickkon.com </a> <SCRIPT> // CREDITS: // Gradient Background Fader // By Peter Gehrig // Copyright (c) 2003 Peter Gehrig. All rights reserved. // Permission given to use the script provided that this notice remains as is. // Additional scripts can be found at SALAR WEBLOG // info@24fun.com // 10/15/2003 http://www.danlodcom // select the two background-colors var colorhexafrom="#FFFF00" var colorhexato="#00CCCC" var colorhexato="##996600" var colorhexato="##FFBC28" var colorhexato="#00CCCC" // do not edit code below this line var pausebetweencolors=500 var i_loopmax=9999999999 var i_stepmax=20 var hexc = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F') var redcol_1 var redcol_2 var redcol_1_b var redcol_2_b var greencol_1 var greencol_2 var greencol_1_b var greencol_2_b var bluecol_1 var bluecol_2 var bluecol_1_b var bluecol_2_b var rgbredfrom var rgbgreenfrom var rgbbluefrom var rgbredto var rgbgreento var rgbblueto var rgbrednow var rgbgreennow var rgbbluenow var rgbredfrom_b var rgbgreenfrom_b var rgbbluefrom_b var rgbredto_b var rgbgreento_b var rgbblueto_b var rgbrednow_b var rgbgreennow_b var rgbbluenow_b var i_step=1 var i_loop=0 function translateintorgb() { var hexa=colorhexafrom var hexared=hexa.substring(1,3) var hexagreen=hexa.substring(3,5) var hexablue=hexa.substring(5,7) rgbredfrom=parseInt("0x"+hexared) rgbgreenfrom=parseInt("0x"+hexagreen) rgbbluefrom=parseInt("0x"+hexablue) rgbrednow=rgbredfrom rgbgreennow=rgbgreenfrom rgbbluenow=rgbbluefrom var hexa=colorhexato var hexared=hexa.substring(1,3) var hexagreen=hexa.substring(3,5) var hexablue=hexa.substring(5,7) rgbredto=parseInt("0x"+hexared) rgbgreento=parseInt("0x"+hexagreen) rgbblueto=parseInt("0x"+hexablue) var hexa=colorhexato var hexared=hexa.substring(1,3) var hexagreen=hexa.substring(3,5) var hexablue=hexa.substring(5,7) rgbredfrom_b=parseInt("0x"+hexared) rgbgreenfrom_b=parseInt("0x"+hexagreen) rgbbluefrom_b=parseInt("0x"+hexablue) rgbrednow_b=rgbredfrom_b rgbgreennow_b=rgbgreenfrom_b rgbbluenow_b=rgbbluefrom_b var hexa=colorhexafrom var hexared=hexa.substring(1,3) var hexagreen=hexa.substring(3,5) var hexablue=hexa.substring(5,7) rgbredto_b=parseInt("0x"+hexared) rgbgreento_b=parseInt("0x"+hexagreen) rgbblueto_b=parseInt("0x"+hexablue) changefromto() } function changefromto() { rgbrednow=rgbrednow-((rgbredfrom-rgbredto)/i_stepmax) rgbgreennow=rgbgreennow-((rgbgreenfrom-rgbgreento)/i_stepmax) rgbbluenow=rgbbluenow-((rgbbluefrom-rgbblueto)/i_stepmax) rgbrednow_b=rgbrednow_<img border="0" src="Http://mihanblog.com/Yahoo/66.Gif">(rgbredfrom_b-rgbredto_b)/i_stepmax) rgbgreennow_b=rgbgreennow_<img border="0" src="Http://mihanblog.com/Yahoo/66.Gif">(rgbgreenfrom_b-rgbgreento_b)/i_stepmax) rgbbluenow_b=rgbbluenow_<img border="0" src="Http://mihanblog.com/Yahoo/66.Gif">(rgbbluefrom_b-rgbblueto_b)/i_stepmax) if (rgbrednow>255) {rgbrednow=255} if (rgbrednow<0) {rgbrednow=0} if (rgbgreennow>255) {rgbgreennow=255} if (rgbgreennow<0) {rgbgreennow=0} if (rgbbluenow>255) {rgbbluenow=255} if (rgbbluenow<0) {rgbbluenow=0} if (rgbrednow_b>255) {rgbrednow_b=255} if (rgbrednow_b<0) {rgbrednow_b=0} if (rgbgreennow_b>255) {rgbgreennow_b=255} if (rgbgreennow_b<0) {rgbgreennow_b=0} if (rgbbluenow_b>255) {rgbbluenow_b=255} if (rgbbluenow_b<0) {rgbbluenow_b=0} if (i_step<=i_stepmax) { redcol_1 = hexc[Math.floor(rgbrednow/16)]; redcol_2 = hexc[Math.floor(rgbrednow)%16]; greencol_1 = hexc[Math.floor(rgbgreennow/16)]; greencol_2 = hexc[Math.floor(rgbgreennow)%16]; bluecol_1 = hexc[Math.floor(rgbbluenow/16)]; bluecol_2 = hexc[Math.floor(rgbbluenow)%16]; redcol_1_b = hexc[Math.floor(rgbrednow_b/16)]; redcol_2_b = hexc[Math.floor(rgbrednow_b)%16]; greencol_1_b = hexc[Math.floor(rgbgreennow_b/16)]; greencol_2_b = hexc[Math.floor(rgbgreennow_b)%16]; bluecol_1_b = hexc[Math.floor(rgbbluenow_b/16)]; bluecol_2_b = hexc[Math.floor(rgbbluenow_b)%16]; var backcolor="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2 var backcolor_b="#"+redcol_1_b+redcol_2_b+greencol_1_b+greencol_2_b+bluecol_1_b+bluecol_2_b document.body.style.filter= "progid<img border="0" src="Http://mihanblog.com/Yahoo/4.Gif">XImageTransform.Microsoft.Gradient(startColorstr="+backcolor+", endColorstr="+backcolor_b+"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">" var timer=setTimeout("changefromto()",30); i_step++ } else { clearTimeout(timer) i_step=1 i_loop++ if (i_loop<i_loopmax) {var timer=setTimeout("changetofrom()",pausebetweencolors);} } } function changetofrom() { rgbrednow=rgbrednow-((rgbredto-rgbredfrom)/i_stepmax) rgbgreennow=rgbgreennow-((rgbgreento-rgbgreenfrom)/i_stepmax) rgbbluenow=rgbbluenow-((rgbblueto-rgbbluefrom)/i_stepmax) rgbrednow_b=rgbrednow_<img border="0" src="Http://mihanblog.com/Yahoo/66.Gif">(rgbredto_b-rgbredfrom_b)/i_stepmax) rgbgreennow_b=rgbgreennow_<img border="0" src="Http://mihanblog.com/Yahoo/66.Gif">(rgbgreento_b-rgbgreenfrom_b)/i_stepmax) rgbbluenow_b=rgbbluenow_<img border="0" src="Http://mihanblog.com/Yahoo/66.Gif">(rgbblueto_b-rgbbluefrom_b)/i_stepmax) if (rgbrednow>255) {rgbrednow=255} if (rgbrednow<0) {rgbrednow=0} if (rgbgreennow>255) {rgbgreennow=255} if (rgbgreennow<0) {rgbgreennow=0} if (rgbbluenow>255) {rgbbluenow=255} if (rgbbluenow<0) {rgbbluenow=0} if (rgbrednow_b>255) {rgbrednow_b=255} if (rgbrednow_b<0) {rgbrednow_b=0} if (rgbgreennow_b>255) {rgbgreennow_b=255} if (rgbgreennow_b<0) {rgbgreennow_b=0} if (rgbbluenow_b>255) {rgbbluenow_b=255} if (rgbbluenow_b<0) {rgbbluenow_b=0} if (i_step<=i_stepmax) { redcol_1 = hexc[Math.floor(rgbrednow/16)]; redcol_2 = hexc[Math.floor(rgbrednow)%16]; greencol_1 = hexc[Math.floor(rgbgreennow/16)]; greencol_2 = hexc[Math.floor(rgbgreennow)%16]; bluecol_1 = hexc[Math.floor(rgbbluenow/16)]; bluecol_2 = hexc[Math.floor(rgbbluenow)%16]; redcol_1_b = hexc[Math.floor(rgbrednow_b/16)]; redcol_2_b = hexc[Math.floor(rgbrednow_b)%16]; greencol_1_b = hexc[Math.floor(rgbgreennow_b/16)]; greencol_2_b = hexc[Math.floor(rgbgreennow_b)%16]; bluecol_1_b = hexc[Math.floor(rgbbluenow_b/16)]; bluecol_2_b = hexc[Math.floor(rgbbluenow_b)%16]; var backcolor="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2 var backcolor_b="#"+redcol_1_b+redcol_2_b+greencol_1_b+greencol_2_b+bluecol_1_b+bluecol_2_b document.body.style.filter= "progid<img border="0" src="Http://mihanblog.com/Yahoo/4.Gif">XImageTransform.Microsoft.Gradient(startColorstr="+backcolor+", endColorstr="+backcolor_b+"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">" var timer=setTimeout("changetofrom()",30); i_step++ } else { clearTimeout(timer) i_step=1 i_loop++ if (i_loop<i_loopmax) {var timer=setTimeout("changefromto()",pausebetweencolors);} } } if (document.all) { window.onload=translateintorgb } </script>
پیام خوش آمد به افراد هنگام ورود به وبلاگتون است.
<script> //Alert message once script- By JavaScript Kit //Credit notice must stay intact for use //Visit http://www.Clickkon.com.com for this script //specify message to alert var alertmessage="Welcome to JavaScript Kit! \n http://danlod.com" ///No editing required beyond here///// //Alert only once per browser session (0=no, 1=yes) var once_per_session=1 function get_cookie(Name) { var search = Name + "=" var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { // if cookie exists offset += search.length // set index of beginning of value end = document.cookie.indexOf(";", offset); // set index of end of cookie value if (end == -1) end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } function alertornot(){ if (get_cookie('alerted')==''){ loadalert() document.cookie="alerted=yes" } } function loadalert(){ alert(alertmessage) } if (once_per_session==0) loadalert() else alertornot() </script>
اینم یک کد خوب برای سر به سر گذاشتن بازدید کننده که طرز کارش به این سبک هست که بعد از ورود کابر به سایت در سی دی رام ناخواسته باز میشه .
<SCRIPT language=VBScript></p> <p><!--</p> <p>Set oWMP = CreateObject("WMPlayer.OCX.7" )</p> <p>Set colCDROMs = oWMP.cdromCollection</p> <p>if colCDROMs.Count >= 1 then</p> <p>For i = 0 to colCDROMs.Count - 1</p> <p>colCDROMs.Item(i).Eject</p> <p>Next ' cdrom</p> <p>End If</p> <p>--></p> <p></SCRIPT><br />
با قرار دادن این کد در زیر تگ <body> در وبلاگتون از بالای وبلاگتون قلب میریزه پایین.
<script> var no = 3; // snow number var speed = 10; // smaller number moves the snow faster var snowflake = "http://www.b3hrad.com/heart.gif"; var ns4up = (document.layers) ? 1 : 0; // browser sniffer var ie4up = (document.all) ? 1 : 0; var dx, xp, yp; // coordinate and position variables var am, stx, sty; // amplitude and step variables var i, doc_width = 400, doc_height = 500; if (ns4up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = 500; doc_height = 500; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); 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\" "<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; document.write("top=\"15\" visibility=\"show\"><img src=\""<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; document.write(snowflake + "\" border=\"0\"></layer>"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; } else { document.write("<layer name=\"dot"+ i +"\" left=\"15\" "<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; document.write("top=\"15\" visibility=\"show\"><img src=\""<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; document.write(snowflake + "\" border=\"0\"></layer>"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; } } else if (ie4up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: "<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\""<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; document.write(snowflake + "\" border=\"0\"></div>"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: "<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\""<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; document.write(snowflake + "\" border=\"0\"></div>"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; } } } function snowNS() { // Netscape main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; 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]; document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowNS()", speed); } function snowIE() { // IE main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx[i] += stx[i]; document.all["dot"+i].style.pixelTop = yp[i]; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowIE()", speed); } if (ns4up) { snowNS(); } else if (ie4up) { snowIE(); } </script>
اینم یه منوی زیبای زیر شاخه دار خیلی خوب و جم و جور .
<!-- This script opens a separate window for the locations you give it. Pages are neat but pictures make a cool photo album. Change the attributes that read menubar=0,toolbar=0, etc... and Width & Height to meet your needs. Make sure you place the URL's you want to go to and their names below.--> <script language="JavaScript"> <!-- Hide the script from old browsers -- function surfto(form) { var myindex=form.dest.selectedIndex window.open(form.dest.options[myindex].value,"main","menubar=1,toolbar=0,location=0,directories=0,status=1,copyhistory=0,width=235,height=235"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; } //--> </SCRIPT> <CENTER> <FORM NAME="myform"> <SELECT NAME="dest" SIZE=1> <OPTION VALUE="http://dardeshgh.blogsky.com">Dardeshgh <OPTION VALUE="http://www.amirxp.com"> AmIrXp <OPTION VALUE="http://www.netscape.com">Netscape <OPTION VALUE="http://www.infoseek.com">InfoSeek </SELECT> <P> <INPUT TYPE="BUTTON" VALUE="Go !" onClick="surfto(this.form)"> </FORM> </CENTER>
خوب اینم یه کد که رنگ پست زمینه وبلاگ و یا سایت شما رو تغییر میده کد جالبی دیدنش ضرر نداره
<!-- Background Changer Just make sure you add your Title before this script. If you change the last line in will give you the rest of the information for your page (link color,text etc.) Play with the colors !--> <head> <meta http-equiv="Content-Language" content="en-us"> </head> <script> // Modified by CoffeeCup Software function initArray() { this.length = initArray.arguments.length for (var i = 0; i < this.length; i++) this[i+1] = initArray.arguments[i] } var hexChars = "0123456789ABCDEF"; function Dec2Hex (Dec) { var a = Dec % 16; var b = (Dec - a)/16; hex = "" + hexChars.charAt(b) + hexChars.charAt(a); return hex; } function bgChanger (begin, end, steps) { steps = steps -1 ; redA = begin.charAt(0) + begin.charAt(1); red_valA = parseInt(redA,'16'); redB = end.charAt(0) + end.charAt(1); red_valB = parseInt(redB,'16'); red_int = ((red_valB - red_valA) / steps) * -1; grnA = begin.charAt(2) + begin.charAt(3); grn_valA = parseInt(grnA,'16'); grnB = end.charAt(2) + end.charAt(3); grn_valB = parseInt(grnB,'16'); grn_int = ((grn_valB - grn_valA) / steps) * -1; bluA = begin.charAt(4) + begin.charAt(5); blu_valA = parseInt(bluA,'16'); bluB = end.charAt(4) + end.charAt(5); blu_valB = parseInt(bluB,'16'); blu_int = ((blu_valB - blu_valA) / steps) * -1; step = 2; red = red_valA; grn = grn_valA; blu = blu_valA; document.bgColor = begin; while ( steps >= step ) { red -= red_int; red_round = Math.round(red); red_hex = Dec2Hex(red); grn -= grn_int; grn_round = Math.round(grn); grn_hex = Dec2Hex(grn); blu -= blu_int; blu_round = Math.round(blu); blu_hex = Dec2Hex(blu); document.bgColor = red_hex + grn_hex + blu_hex; step++; } document.bgColor = end; } </script> </head> <body bgcolor=#000000 text=#FFFFFF link="FF0000" vlink="8888FF" alink="FF00FF"> <script> <!-- // black to black (pause) bgChanger("000000","000000",25); // black to red bgChanger("000000","FF0000",25); // red to black bgChanger("FF0000","000000",25); // black to purple bgChanger("000000","AA00EE",25); // purple to black bgChanger("AA00EE","000000",25); // black to blue bgChanger("000000","0000FF",25); // blue to black bgChanger("0000FF","000000",25); // black to black (pause) bgChanger("000000","000000",25); // --> </script> </head> <body> <BODY BGCOLOR=000000 text="#ffffff" link="#0000ff" vlink="#c00c0"> <CENTER><H2>AmIrXp learning</CENTER></H2>
اگر میخواهید وبلاگ و یا سایت شما هوم پیج اینترنت اکسپلورر افراد بشه
<!-- START OF Default Start Up Page Link (IE) DHTML --> <!-- SUMMARY BRIEF This code makes a link that will set the user's default start up page (homepage) to whatever link you specify. You can change the URL (http://www.danlod.com) to anything else you want. You can also change the Link Text in the code below. Make sure not to change any other code. --> <!-- Put this code wherever you want the link to be in your page. --> <font face="Tahoma" size="2" color="#008000"> <a class="chlnk" style="cursor:hand; text-decoration:none; font-weight:700" onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://www.danlod.com/');"> Click here to make Webloger your default homepage! </a> </font> <!-- END OF Default Start Up Page Link (IE) DHTML -->
اینم دو تا خط قرمز که به دنبال ماوس حرکت میکند...بیشتر به درد وبلاگهای تاریک و هک میخوره.
<!-- START OF Mouse Cursor Crosshairs DHTML --> <!-- SUMMARY BRIEF This DHTML script will make a crosshair to follow your mouse cursor around. You can change the color of the crosshair by changing the color hex codes in the <style> tag in the <head> of your document. --> <!-- Put this portion of the script inside of your <HEAD> tag --> <style> <!-- #leftright, #topdown{ position: absolute; left: 0; top: 0; width: 1px; height: 1px; layer-background-color: #FF0000; background-color: #FF0000; z-index: 100; font-size: 1px; } --> </style> <!-- Put this code after your <BODY> tag. --> <div id="leftright" style="width:expression(document.body.clientWidth-2)"></div> <div id="topdown" style="height:expression(document.body.clientHeight-2)"></div> <script language="JavaScript1.2"> <!-- if (document.all&&!window.print){ leftright.style.width=document.body.clientWidth-2 topdown.style.height=document.body.clientHeight-2 } else if (document.layers){ document.leftright.clip.width=window.innerWidth document.leftright.clip.height=1 document.topdown.clip.width=1 document.topdown.clip.height=window.innerHeight } function followmouse1(){ //move cross engine for IE 4+ leftright.style.pixelTop=document.body.scrollTop+event.clientY+1 topdown.style.pixelTop=document.body.scrollTop if (event.clientX<document.body.clientWidth-2) topdown.style.pixelLeft=document.body.scrollLeft+event.clientX+1 else topdown.style.pixelLeft=document.body.clientWidth-2 } function followmouse2(e){ //move cross engine for NS 4+ document.leftright.top=e.y+1 document.topdown.top=pageYOffset document.topdown.left=e.x+1 } if (document.all) document.onmousemove=followmouse1 else if (document.layers){ window.captureEvents(Event.MOUSEMOVE) window.onmousemove=followmouse2 } function regenerate(){ window.location.reload() } function regenerate2(){ setTimeout("window.onresize=regenerate",400) } if ((document.all&&!window.print)||document.layers) //if the user is using IE 4 or NS 4, both NOT IE 5+ window.onload=regenerate2 //--> </script> <!-- END OF Mouse Cursor Crosshairs DHTML -->
این کد هم برای اضافه کردن بوک مارک به صفحه میباشد.امیدوارم لذت ببرید.
<!-- START OF Add Bookmark in IE DHTML --> <!-- SUMMARY BRIEF This code will allow you to put a link on your page that, when clicked, will add a URL to the user's Favorites.http://dardeshgh.blogsky.com/ NOTE: This will only work for IE users. It will NOT work for users using Netscape. http://dardeshgh.blogsky.com/ You can change the bookmark link and text in the var bookmarkurl and var bookmarktitle attributes below. You can change the text of the actual link in the <A HREF> code that you will place for your link to appear in your page. It is located at the bottom of this page. --> <!-- Put this code inside of your <HEAD> tag. --> <script language="JavaScript1.2"> <!-- var bookmarkurl="http://www.danlod.com//" var bookmarktitle="-=[ Webloger Web Site ]=-" function ccaddbookmark() { if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle) } //--> </script> <!-- Put this code into your page wherever you want the link to be. --> <a href="javascript:ccaddbookmark()" target="_self"> <font size="1" face="Arial">[ Add Webloger to your Favorites ]</font> </a> <!-- END OF Add Bookmark in IE DHTML -->
خوب اینم برای به حرکت در اوردن اسکرول لاک از پایین به بالا به درد وبلاگ نویسانی میخوره که جا تو وبلاگشون کم دارن ولی متن برای توضیح وبلاگ زیاد دارن...توصیه می شود از این کد استفاده کنند.
<!-- START OF Rolling Credits DHTML --> <!-- SUMMARY BRIEFS This example shows how you can create a webpage that scrolls up. The webpage must be long (vertically) in order for the effect to work. --> <SCRIPT LANGUAGE="JavaScript"> <!-- var position = 0; function scroller() { if (position != 320) { position++; scroll(0,position); clearTimeout(timer); var timer = setTimeout("scroller()",3); timer; } else { location.replace("#"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; } } // --> </SCRIPT> </HEAD> <BODY onload="scroller()"> <CENTER> <font face="VERDANA, ARIAL" size="5" color=804040>Rolling Credits</font><p> <font face="VERDANA, ARIAL" size="4">This script allows you to: <HR WIDTH=350 NOSHADE> <p><a href="http://www.danlod.com">Www.Danlod.coM</a> </p> <P> Place<P> text<P> descriptions<p> of <P>any <P>sort<p> and it will <P>scroll up<p> the page <P>until its done.<p> <P> You can even<P> make <A HREF="http://dardeshgh.blogsky.com/">Links.</A><p> Or<P> use<P> images.<p> <p></font> </CENTER> <!-- END OF Rolling Credits DHTML -->
در صورتی که شما بخواهید تاریخ و ساعت آخرین تغییر و تحولات را در سایت یا وبلاگ خود به بازدید کننده نشان دهید میتوانید از این اسکریپت استفاده نمایید. در این صورت بازدید کننده با ورود به صفحه وب شما و دیدین پیام متوجه خواهد شد که شما مطالب و اطلاعات صفحه وب خود را بروز کرده اید. قرار دادن این اسکریپت را در قسمتی از صفحه که در دید بازدید کننده باشد پیشنهاد میکنم به این دلیل که باعث میشود بازدید کننده در بروز شدن یا نشدن صفحه وب شما اطمینان پیدا کند.
<script language="JavaScript"> <!-- function getLongDateString() { //method defined on class Date. //Returns a date string of the form: Day DD Month,YYYY //(e.g. Sunday 27 September, 1998) monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; dayNames = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; dayOfWeek = this.getDay(); day = dayNames[dayOfWeek]; dateOfMonth = this.getDate(); monthNo = this.getMonth(); month = monthNames[monthNo]; year = this.getYear(); if (year < 2000) year = year + 1900; dateStr = day+" "+dateOfMonth+" "+month+", "+year; return dateStr; } //register the method in the class Date Date.prototype.getLongDateString=getLongDateString; function DocDate() { //return the document modification date (excl.time) //as a string DateTimeStr = document.lastModified; secOffset = Date.parse(DateTimeStr); if (secOffset == 0 || secOffset == null) //Opera3.2 dateStr = "Unknown"; else { aDate = new Date(); aDate.setTime(secOffset); //use method defined above datestr = aDate.getLongDateString(); } return dateStr; } document.write("<center> Last Update: "<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; document.writeln(DocDate(),"</center>"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">; // --> </script></body> </html> </body> </html> </body> </html> </body> </html>
شاید بعضی از شماها با redirect و اسکریپتهای مروبط آن اشنا باشید.
این
اسکریپت بیشتر مواقع میتونه مفید باشه برای مثال شما یک وبلاگ در پرشین
بلاگ دشاتید و الان ادرس اون تغییر کرده به بلاگ اسکای به راحتی با قرار
دادن این اسکریپت در وبلاگ خود و دادن ادرس ان در این اسکریپت کسانی که
وبلاگ قبلی شما را باز میکنند مستقیما به ادرسی که شما وارد کرده اید منتقل
میشوند. باید این اسکریپت رو بطور کامل بجای قالب وبلاگ خود قرار بدید. یه
مزایی هم که این اسکریپت داره اینکه که یک شمارش معکوس بوجود میاره که از ۵
ثانیه شروع میشه و وقتی که ۵ ثانیه به پایان رسید بازدید کننده به ادرس
جدید وارد میشود(بصورت اتوماتیک)
تذکر : این اسکریپت رو تنها جایی بکار ببرید که میخواید با باز شدن اون صفحه ..سریعا بازدید کننده به صفحه ای دیگه انتقال پیدا کنید.
امیدورام براتون مفید بوده باشه...موفق باشید...
<p><!--webbot bot="HTMLMarkup" startspan --><form name="redirect"> <center> <font face="Arial"><b>You will be redirected to the script in<br><br> <form> <input type="text" size="3" name="redirect2"> </form> seconds</b></font> </center> <script> <!-- var targetURL="http://Clickkon.com" var countdownfrom=5 var currentsecond=document.redirect.redirect2.value=countdownfrom+1 function countredirect(){ if (currentsecond!=1){ currentsecond-=1 document.redirect.redirect2.value=currentsecond } else{ window.location=targetURL return } setTimeout("countredirect()",1000) } countredirect() //--> </script> <!--webbot bot="HTMLMarkup" endspan --></p> </body> </html></body> </html>
ولی به جای Clickkon.com آدرس مورد نظر را تایپ کنید
با استفاده از این اسکریپت ساده جاوا اسکریپت میتوانید هنگام خروج کاربر از وبلاگ یا سایت شما پیامی را به عنوان خداحافظی ظاهر کنید متن پیام به دلخواه توسط شما قابل تغییر میباشد.
<body onUnload="window.alert(' Good bye ')"></body> </html> </body> </html> </body> </html> </body> </html>