::معرفی کد های وبلاگ نویسی (( از مبتدی تا حرفه ای )) ::
1 _ اینجا جای درخواست نیست پس درخواست نکنید .
2 _ اینجا فقط کد معرفی میشود و هر وقت کد مناسبی دیدم حتمآ میزارم.
با تشکر!ehsan.infernal
Printable View
::معرفی کد های وبلاگ نویسی (( از مبتدی تا حرفه ای )) ::
1 _ اینجا جای درخواست نیست پس درخواست نکنید .
2 _ اینجا فقط کد معرفی میشود و هر وقت کد مناسبی دیدم حتمآ میزارم.
با تشکر!ehsan.infernal
کد:
تبدیل به صفحه خانگی
onClick="javascript:this.style.behavior='url(#defa ult#homepage)';this.setHomePage
('http://www.ADRESE SITE SHOMA.com');" TARGET="_self">اينجا رو صفحه خانگي خودت کن!</A>
</center>
نمایش تعداد کاربران انلاین
<script src=http://fastonlineusers.com/online.php?d=www.ADRESE SITE SHOMA.com></script> online</a>
یک ساعت خیلی جالب
<!-- ONE STEP TO INSTALL BUTTON TIME:
1. Put the coding into the BODY of your HTML doent -->
<!-- STEP ONE: Add this code into the BODY of your HTML doent -->
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Michael Tartaglia <pesar_e_jahromi@yahoo.com> -->
<!-- Web Site: http://www.pesarejahromi.mihanblog.com -->
<!--Total Java Scripts 99 - Next Step Software-->
<!-- Begin
day = new Date();
miVisit = day.getTime();
function clock() {
dayTwo = new Date();
hrNow = dayTwo.getHours();
mnNow = dayTwo.getMinutes();
scNow = dayTwo.getSeconds();
miNow = dayTwo.getTime();
if (hrNow == 0) {
hour = 12;
ap = " AM";
} else if(hrNow <= 11) {
ap = " AM";
hour = hrNow;
} else if(hrNow == 12) {
ap = " PM";
hour = 12;
} else if (hrNow >= 13) {
hour = (hrNow - 12);
ap = " PM";
}
if (hrNow >= 13) {
hour = hrNow - 12;
}
if (mnNow <= 9) {
min = "0" + mnNow;
}
else (min = mnNow)
if (scNow <= 9) {
secs = "0" + scNow;
} else {
secs = scNow;
}
time = hour + ":" + min + ":" + secs + ap;
doent.form.button.value = time;
self.status = time;
setTimeout('clock()', 1000);
}
function timeInfo() {
milliSince = miNow;
milliNow = miNow - miVisit;
secsVisit = Math.round(milliNow / 1000);
minsVisit = Math.round((milliNow / 1000) / 60);
alert("There have been " + milliSince + " milliseconds since midnight, January 1, 1970. "
+ "You have spent " + milliNow + " of those milliseconds on this page. "
+ ".... About " + minsVisit + " minutes, and "
+ secsVisit + " seconds.");
}
doent.write("<form name=\"form\">"
+ "<input type=button value=\"Click for info!\""
+ " name=button onClick=\"timeInfo()\"></form>");
onError = null;
clock();
// End -->
</SCRIPT>
<!-- Script Size: 1.72 KB -->
</body>
</html>
فلش در وبلاگ یا و بسایت شما
کد:
<<embed width="128" height="128" src="ADRESE FLASH DAR INJA"></p>
</body>
</html>
مرلین در وبلاگ و سایت شما
کد:<OBJECT id=wolfi classid=CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F>></OBJECT>
<SCRIPT language=JavaScript type=text/javascript>
function LoadLocalAgent(CharID, CharACS) {
LoadReq = wolfi.Characters.Load(CharID, CharACS);
return(true);
}
var MerlinID;
var MerlinACS;
wolfi.Connected = true;
MerlinLoaded = LoadLocalAgent(MerlinID, MerlinACS);
Merlin = wolfi.Characters.Character(MerlinID);
Merlin.Show();
Merlin.Play("Surprised");
Merlin.speak("hi dear");
Merlin.MoveTo (350,250);
Merlin.Play("Surprised");
Merlin.Play("GetAttention");
Merlin.Play("GetAttention");
Merlin.Play("Blink"); Merlin.Play("Blink");
Merlin.speak(" Welcome to <#user#> ");
Merlin.Play("Blink"); Merlin.Play("Confused");
Merlin.speak("i hope enjoy to this website");
Merlin.Play('GestureLeft');
Merlin.Play("Blink")
Merlin.Hide();
</SCRIPT>
جلوگیری از کپی کردن مطالب
</script>
<SCRIPT language=JavaScript1.2>
//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
doent.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
doent.onmousedown=disableselect
doent.onclick=reEnable
}
</SCRIPT>
موتور جستجوی MSN
کد:<table BORDER="0" WIDTH="222" HEIGHT="18">
<tr>
<td WIDTH="214" HEIGHT="10">
<form NAME="search" ID="search" ACTION="http://search.msn.com/results.asp" METHOD="get">
<p><a HREF="http://www.msn.com">
<img SRC="http://go.msn.com/AG/E/0.asp" width="61" height="33" BORDER="0" ALT="Go to msn.com"></a><font FACE="arial" SIZE="2"><strong>Search
<font COLOR="#808080">the Web for:</font></strong></font><br>
<input TYPE="text" ID="q" SIZE="18" MAXLENGTH="251" NAME="q" VCARD_NAME="SearchText"><input TYPE="submit" VALUE="Search" NAME="B1"><input TYPE="hidden" NAME="FORM" VALUE="FRNT"><input TYPE="hidden" NAME="un" VALUE="doc"><input TYPE="hidden" NAME="v" VALUE="1"></p>
</form>
</td>
</tr>
<tr>
<td WIDTH="214" HEIGHT="21" VALIGN="bottom">
<p ALIGN="center"><font SIZE="1" FACE="arial">
<a HREF="http://search.msn.com/advanced.asp?MT=&RS=CHECKED&Form=FRNT">Use
Advanced Search</a></font></td>
</tr>
</table>
<p> </p>
</body>
</html>
قرار دادن اهنگ با یک playe در سایت
کد:<p align="center" style="margin-top: 0; margin-bottom: 0">
<EMBED SRC='ADRESE AHANG DAR INJA ' WIDTH=120 HEIGHT=26 LOOP=true type=audio/x-pn-realaudio-plugin></TD></TR></TBODY></TABLE></TD>
<TD vAlign=top align=left width=4
</body>
</html>
نمایش مشخصات IE
کد:<font size=2>
<SCRIPT language=JavaScript>
<!-- Begin
var xy = navigator.appVersion;
xz = xy.substring(22,25);
doent.write("MOROORGARE SHOMA : ", navigator.appName,"<br>");
doent.write("NEGARESH : ",xz,"<br>");
doent.write("VOZOOHE SAFHE : ",screen.width," در ",screen.height,"PICSEL<br>");
if (navigator.javaEnabled()) doent.write("JAVA FAAL AST<br>");
else doent.write("JAVA FAAL NIST<br>")
// End -->
</SCRIPT> </font>
راست کلیکو میبنده یه پیام میده
کد:<!--
Start with www.pesarejahromi.mihanblog.com
-->
<SCRIPT language=javascript>
function noRightClick() {
if (event.button==2) {
alert('HOY HOY ... HAVASET BASHE HAAA ...')
}
}
doent.onmousedown=noRightClick
</SCRIPT>
<!-- End www.pesarejahromi.mihanblog.com -->
راست کلیکو بدون هیچ پیامی بر میداره
کد:<!--
Start with www.pesarejahromi.mihanblog.com
-->
<script language=JavaScript>
function clickIE() {
if (doent.all) {
return false;
}
}
function clickNS(e) {
if (doent.layers||(doent.getElementById&&!do ent.all)) {
if (e.which==2||e.which==3) {
return false;
}
}
}
if (doent.layers) {
doent.captureEvents(Event.MOUSEDOWN);
doent.onmousedown=clickNS;
}
else{
doent.onmouseup=clickNS;
doent.oncontextmenu=clickIE;
}
doent.oncontextmenu=new Function("return false")
</script>
<!-- End www.pesarejahromi.mihanblog.com -->
تقویم میلادی!!!
کد:
<!--
Start with www.pesarejahromi.mihanblog.com
-->
<!-- ONE STEP TO INSTALL MONTHLY: DAY HIGHLIGHTED:
1. Put the code into the BODY of your HTML doent -->
<!-- STEP ONE: Copy this code into the HEAD your HTML doent -->
<BODY>
<CENTER>
<SCRIPT LANGUAGE="JavaScript">
<!--Total Java Scripts 99 - Next Step Software-->
<!-- Begin
monthnames = new Array(
"January",
"Februrary",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"Decemeber");
var linkcount=0;
function addlink(month, day, href) {
var entry = new Array(3);
entry[0] = month;
entry[1] = day;
entry[2] = href;
this[linkcount++] = entry;
}
Array.prototype.addlink = addlink;
linkdays = new Array();
monthdays = new Array(12);
monthdays[0]=31;
monthdays[1]=28;
monthdays[2]=31;
monthdays[3]=30;
monthdays[4]=31;
monthdays[5]=30;
monthdays[6]=31;
monthdays[7]=31;
monthdays[8]=30;
monthdays[9]=31;
monthdays[10]=30;
monthdays[11]=31;
todayDate=new Date();
thisday=todayDate.getDay();
thismonth=todayDate.getMonth();
thisdate=todayDate.getDate();
thisyear=todayDate.getYear();
thisyear = thisyear % 100;
thisyear = ((thisyear < 50) ? (2000 + thisyear) : (1900 + thisyear));
if (((thisyear % 4 == 0)
&& !(thisyear % 100 == 0))
||(thisyear % 400 == 0)) monthdays[1]++;
startspaces=thisdate;
while (startspaces > 7) startspaces-=7;
startspaces = thisday - startspaces + 1;
if (startspaces < 0) startspaces+=7;
doent.write("<table border=2 bgcolor=white ");
doent.write("bordercolor=black><font color=black>");
doent.write("<tr><td colspan=7><center><strong>"
+ monthnames[thismonth] + " " + thisyear
+ "</strong></center></font></td></tr>");
doent.write("<tr>");
doent.write("<td align=center>Su</td>");
doent.write("<td align=center>M</td>");
doent.write("<td align=center>Tu</td>");
doent.write("<td align=center>W</td>");
doent.write("<td align=center>Th</td>");
doent.write("<td align=center>F</td>");
doent.write("<td align=center>Sa</td>");
doent.write("</tr>");
doent.write("<tr>");
for (s=0;s<startspaces;s++) {
doent.write("<td> </td>");
}
count=1;
while (count <= monthdays[thismonth]) {
for (b = startspaces;b<7;b++) {
linktrue=false;
doent.write("<td>");
for (c=0;c<linkdays.length;c++) {
if (linkdays[c] != null) {
if ((linkdays[c][0]==thismonth + 1) && (linkdays[c][1]==count)) {
doent.write("<a href=\"" + linkdays[c][2] + "\">");
linktrue=true;
}
}
}
if (count==thisdate) {
doent.write("<font color='FF0000'><strong>");
}
if (count <= monthdays[thismonth]) {
doent.write(count);
}
else {
doent.write(" ");
}
if (count==thisdate) {
doent.write("</strong></font>");
}
if (linktrue)
doent.write("</a>");
doent.write("</td>");
count++;
}
doent.write("</tr>");
doent.write("<tr>");
startspaces=0;
}
doent.write("</table></p>");
// End -->
</SCRIPT>
</CENTER>
<!-- End www.pesarejahromi.mihanblog.com -->
تبادل لوگو
کد:<!--
Start with www.pesarejahromi.mihanblog.com
-->
<p align="center"><a href="ADRESE LINK INJA" target="_blank"><img border="0" src="ADRESE AX DAR INJA"</body>
</html>
<!-- End www.pesarejahromi.mihanblog.com -->
پرسیدن نام کاربر و خوش امد گویی به اون
کد:<!--
Start with www.pesarejahromi.mihanblog.com
-->
<SCRIPT language=Javascript>
<!-- Begin
var namePrompt = prompt(" YOUR MASSAGE HERE");
function dispname (namePrompt) {
doent.write(""+namePrompt+"");
}
// End -->
</SCRIPT>
<center>
<SCRIPT language=Javascript>
<!-- Begin
dispname(namePrompt);
doent.write("<font size=4 color=#6699FF Face=Tahoma> WELCOM ");
doent.write("</font>");
// End -->
</SCRIPT></center>
<!-- End www.pesarejahromi.mihanblog.com -->
رقص نور برای لینک های شما
کد:<!--
Start with www.pesarejahromi.mihanblog.com
-->
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function initArray() {
for (var i = 0; i < initArray.arguments.length; i++) {
this[i] = initArray.arguments[i];
}
this.length = initArray.arguments.length;
}
var colors = new initArray(
"red",
"blue",
"green",
"purple",
"black",
"tan",
"red");
delay = .5; // seconds
link = 0;
vlink = 2;
function linkDance() {
link = (link+1)%colors.length;
vlink = (vlink+1)%colors.length;
doent.linkColor = colors[link];
doent.vlinkColor = colors[vlink];
setTimeout("linkDance()",delay*1000);
}
linkDance();
// End -->
</script></body>
</html>
<!-- End www.pesarejahromi.mihanblog.com -->
با اومدن پاییز وبلاگت بارونی میشه
ستاره های رنگیکد:<!--Powered javascript code by www.pesarejahromi.mihanblog.com--><style>
.drop { position: absolute; width: 3; filter: flipV(), flipH(); font-size: 40; color: blue }
</style>
<script language="javascript">
//Rain/Snow effect- By Craig Blanchette kodhaye-weblog
//Visit http://www.kodhaye-weblog.persianblog.com
snow = false; // false-rain; true-snow
snowsym = " * " //These are the symbols for each
rainsym = " ' " //You can put images here.
howmany = 10 //How many drops/snowflakes?
/**************Do not need to change anything below***********/
if(snow){sym = snowsym; speed=1; angle=10; drops=howmany}
else{sym = rainsym; speed=50; drops=howmany; angle=6}
movex = -speed/angle; movey = speed; count = 0;
function moverain(){
for(move = 0; move < drops; move++){
xx[move]+=movex; yy[move]+=mv[move];
hmm = Math.round(Math.random()*1);
if(xx[move] < 0){xx[move] = maxx+10;}
if(yy[move] > maxy){yy[move] = 10;}
drop[move].left = xx[move]
drop[move].top = yy[move]+doent.body.scrollTop;
}setTimeout('moverain()','1')}
</script>
<script language="javascript">
if (doent.all){
drop = new Array(); xx = new Array(); yy = new Array(); mv = new Array()
ly = "doent.all[\'"; st = "\'].style"
for(make = 0; make < drops; make++){
doent.write('<div id="drop'+make+'" class=drop>'+sym+'</div>');
drop[make] = eval(ly+'drop'+make+st);
maxx = doent.body.clientWidth-40
maxy = doent.body.clientHeight-40
xx[make] = Math.random()*maxx;
yy[make] = -100-Math.random()*maxy;
drop[make].left = xx[make]
drop[make].top = yy[make]
mv[make] = (Math.random()*5)+speed/4;
drop[make].fontSize = (Math.random()*10)+20;
if(snow){col = 'white'}else{col = 'blue'}
drop[make].color = col;
}
window.onload=moverain
}
</script>
کد:<!--Powered javascript code by WWW.pesarejahromi.mihanblog.com-->
<body>
<script LANGUAGE="JavaScript1.2">
<!--
//set Interval between each firework display,
var intervals=2000
var sparksOn = true;
var speed = 25;
var power = 1;
//Dont change these values-------
var doentWidth=doentHeight=randomx=randomy=leftc orner=topcorner=0
var ns=(doent.layers);
var ie=(doent.all);
var sparksAflyin = false;
var allDivs = new Array(10);
var totalSparks = 0;
//-------------------------------
function initAll(){
if(!ns && !ie){
sparksOn = false;
return;
}
setInterval("firework()",intervals)
if (ns)
doent.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);
for(dNum=0; dNum<7; ++dNum){
if(ie)
allDivs[dNum]=eval('doent.all.sDiv'+dNum+'.style');
else
allDivs[dNum]=eval('doent.layers["sDiv'+dNum+'"]');
}
}
function firework(){
//below code detects the browser dimenions
if (ie){
doentWidth=doent.body.clientWidth
doentHeight=doent.body.clientHeight
leftcorner=doent.body.scrollLeft
topcorner=doent.body.scrollTop
}
else if (ns){
doentWidth=window.innerWidth
doentHeight=window.innerHeight
leftcorner=pageXOffset
topcorner=pageYOffset
}
//below code randomly generates a set of coordinates that fall within the dimension
randomx=leftcorner+Math.floor(Math.random()*doe ntWidth)
randomy=topcorner+Math.floor(Math.random()*doen tHeight)
if(sparksOn){
if(!sparksAflyin){
sparksAflyin=true;
totalSparks=0;
for(var spark=0;spark<=6;spark++){
dx=Math.round(Math.random()*50);
dy=Math.round(Math.random()*50);
moveTo(spark,randomx,randomy,dx,dy);
}
}
}
}
function moveTo(i,tempx,tempy,dx,dy){
if(ie){
if(tempy+80>(doent.body.offsetHeight+doent.b ody.scrollTop))
tempy=doent.body.offsetHeight+doent.body.scr ollTop-80;
if(tempx+80>(doent.body.offsetWidth+doent.bo dy.scrollLeft))
tempx=doent.body.offsetWidth+doent.body.scro llLeft-80;
}
if(tempx>-50&&tempy>-50){
tempx+=dx;tempy+=dy;
allDivs[i].left=tempx;
allDivs[i].top=tempy;
dx-=power;dy-=power;
setTimeout("moveTo("+i+","+tempx+","+tempy+","+dx+ ","+dy+")",speed)
}
else
++totalSparks
if(totalSparks==7){
sparksAflyin=false;
totalSparks=0;
}
}
window.onload=initAll
//End-->
</script>
<style>
#sDiv0 {position:absolute; height:1; width:1; font-family:arial black; font-size:25px; color:Aqua;}
#sDiv1 {position:absolute; height:1; width:1; font-family:arial black; font-size:22px; color:red;}
#sDiv2 {position:absolute; height:1; width:1; font-family:arial black; font-size:20px; color:blue;}
#sDiv3 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:orange;}
#sDiv4 {position:absolute; height:1; width:1; font-family:arial black; font-size:25px; color:yellow;}
#sDiv5 {position:absolute; height:1; width:1; font-family:arial black; font-size:25px; color:lightgreen;}
#sDiv6 {position:absolute; height:1; width:1; font-family:arial black; font-size:20px; color:silver;}
</style>
<p></p>
<div id="sDiv0">
*</div>
<div id="sDiv1">
*</div>
<div id="sDiv2">
*</div>
<div id="sDiv3">
*</div>
<div id="sDiv4">
*</div>
<div id="sDiv5">
*</div>
<div id="sDiv6">
*</div>
</body>
</html>
<!--END CODE - Powered java script code by WWW.SONYCARD20.COM-->
یک نوع از انفجار ستاره های رنگی
کد:<!--Powered javascript code by www.pesarejahromi.mihanblog.com.com-->
<HEAD>
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: Jacco IJzerman (j.ijzerman1@chello.nl ) -->
<!-- Web Site: http://variomatic.quickhost.nl -->
<!--[if IE ]>
<style type="text/css">
body { overflow: hidden; }
v\:* { behavior: url(#default#VML); }
</style>
<![endif]-->
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML doent -->
<BODY>
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: Jacco IJzerman (j.ijzerman1@chello.nl ) -->
<!-- Web Site: http://variomatic.quickhost.nl -->
<!--[if IE ]>
<script language="JavaScript">
colors = new Array();
// Define your own color combinations
colors[0] = new Array('yellow', 'lime');
colors[1] = new Array('silver', 'green')
colors[2] = new Array('silver', 'blue');
colors[3] = new Array('silver', 'purple');
colors[4] = new Array('purple', 'white');
colors[5] = new Array('blue', 'silver');
colors[6] = new Array('red', 'fuchsia');
colors[7] = new Array('yellow', 'red');
// Define the maximum number of fire arrows
maximum = 1000;
vmlobj='';
for(i = 0; i < 12; i++){
vmlobj += '<div id="ster'+i+'" style="position:absolute; left:-50px; top-50px; visibility:hidden; z-index:50;">';
vmlobj += '<v:shape style="width:15px; height:15px;" fillcolor="yellow" coordorigin="0,0" coordsize="200 200">';
vmlobj += '<v:path v="m 8,65 l 72,65, 92,11, 112,65, 174,65, 122,100, 142,155,92,121, 42,155, 60,100 x e"/>';
vmlobj += '<v:stroke on="false" /></v:shape></div>';
}
doent.write(vmlobj); vmlobj = null;
aantal = 0;
function begin()
{
try {
if(aantal == maximum){ return;}
kleurschema = Math.floor(Math.random() * colors.length);
posLinks = Math.floor(Math.random() * (doent.body.clientWidth - 180));
posLinks = (posLinks < 170)? 170: posLinks;
posBoven = Math.floor(Math.random() * (doent.body.clientHeight - 180));
posBoven = (posBoven < 170)? 170: posBoven;
straal = 0; uiteen = true; teller = 1; flikkereffect = false;
for(var i = 0; i < 12; i++){
doent.getElementsByTagName('shape')[i].setAttribute('fillcolor', colors[kleurschema][0]);
doent.getElementById('ster'+i).style.visibility = 'hidden'; // 5.0 fix
doent.getElementById('ster'+i).style.left = posLinks;
doent.getElementById('ster'+i).style.top = posBoven;
}
doent.getElementById('ster0').style.top = (doent.body.clientHeight - 20);
doent.getElementById('ster0').style.visibility = 'visible';
omhoog();
} catch(e){}
}
function omhoog()
{
try {
positie = parseInt(doent.getElementById('ster0').style.to p);
if(positie > posBoven){
doent.getElementById('ster0').style.top = (positie - 25);
setTimeout('omhoog()', 50);
} else {
for(i = 1; i < 12; i++){
doent.getElementById('ster'+i).style.top = positie;
doent.getElementById('ster'+i).style.visibility = 'visible';
}
uiteenspatten();
}
} catch(e){}
}
function uiteenspatten()
{
try {
if(straal > 120 && straal % 10 == 0){
flikkereffect = true;
teller = (teller == colors[kleurschema].length)? 0: (teller+1);
}
for(var i = 0; i < 12; i++){
var hoek = i * 30;
var piHoek = Math.PI - Math.PI / 180 * hoek;
var links = posLinks + Math.round(straal * Math.sin(piHoek));
var boven = positie + Math.round(straal * Math.cos(piHoek));
doent.getElementById('ster'+i).style.left = links;
doent.getElementById('ster'+i).style.top = boven;
if(flikkereffect){
doent.getElementsByTagName('shape')[i].setAttribute('fillcolor', colors[kleurschema][teller]);
}
}
if(straal < 160 && uiteen){
straal += (straal < 120)? 10: 5;
setTimeout('uiteenspatten()', 50);
}
else if(straal > 120){
uiteen = false; straal -= 5;
setTimeout('uiteenspatten()', 50);
}
else if(straal <= 120){
for(var i = 0; i < 12; i++){
doent.getElementById('ster'+i).style.visibility = 'hidden';
}
aantal++;
setTimeout('begin()', 500);
}
} catch(e) {}
}
window.onload=begin;
</script>
<![endif]-->
نقطه های رنگی که منفجر میشوند
کد:<!--Powered javascript code by www.pesarejahromi.mihanblog.com.com-->
<BODY>
<layer name="a0" left=10 top=10 visibility=show bgcolor="#ffffff" clip="0,0,1,1"></layer>
<layer name="a1" left=10 top=10 visibility=show bgcolor="#fff000" clip="0,0,1,1"></layer>
<layer name="a2" left=10 top=10 visibility=show bgcolor="#ffa000" clip="0,0,1,1"></layer>
<layer name="a3" left=10 top=10 visibility=show bgcolor="#ff00ff" clip="0,0,1,1"></layer>
<layer name="a4" left=10 top=10 visibility=show bgcolor="#00ff00" clip="0,0,1,1"></layer>
<layer name="a5" left=10 top=10 visibility=show bgcolor="#ff00ff" clip="0,0,1,1"></layer>
<layer name="a6" left=10 top=10 visibility=show bgcolor="#ff0000" clip="0,0,1,1"></layer>
<layer name="a7" left=10 top=10 visibility=show bgcolor="#ffffff" clip="0,0,1,1"></layer>
<layer name="a8" left=10 top=10 visibility=show bgcolor="#fff000" clip="0,0,1,1"></layer>
<layer name="a9" left=10 top=10 visibility=show bgcolor="#ffa000" clip="0,0,1,1"></layer>
<layer name="a10" left=10 top=10 visibility=show bgcolor="#ff00ff" clip="0,0,1,1"></layer>
<layer name="a11" left=10 top=10 visibility=show bgcolor="#00ff00" clip="0,0,2,2"></layer>
<layer name="a12" left=10 top=10 visibility=show bgcolor="#0000ff" clip="0,0,2,2"></layer>
<layer name="a13" left=10 top=10 visibility=show bgcolor="#ff0000" clip="0,0,2,2"></layer>
<div id="starsDiv" style="position:absolute;top:0px;left:0px">
<div style="position:relative;width:2px;height:2px;back ground:#ffffff;font-size:2px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#fff000;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#ffa000;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#ff00ff;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#00ff00;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#0000ff;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#FF0000;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#ffffff;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#fff000;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#ffa000;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#ff00ff;font-size:1px"></div>
<div style="position:relative;width:2px;height:2px;back ground:#ff00ff;font-size:2px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#0000ff;font-size:1px"></div>
<div style="position:relative;width:1px;height:1px;back ground:#FF0000;font-size:1px"></div>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Kurt Grigg (kurt.grigg@virgin.net) -->
<!-- Web Site: http://freespace.virgin.net/kurt.grigg -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var Clrs = new Array(9);
Clrs[0] = 'ff0000';
Clrs[1] = '00ff00';
Clrs[2] = '000aff';
Clrs[3] = 'ff00ff';
Clrs[4] = 'ffa500';
Clrs[5] = 'ffff00';
Clrs[6] = '00ff00';
Clrs[7] = 'ffffff';
Clrs[8] = 'fffff0';
var sClrs = new Array(5);
sClrs[0] = 'ffa500';
sClrs[1] = '55ff66';
sClrs[2] = 'AC9DFC';
sClrs[3] = 'fff000';
sClrs[4] = 'fffff0';
var yBase;
var xBase;
var step;
var currStep = 0;
var Xpos = 1;
var Ypos = 1;
var initialStarColor = 'ffa000';
var Mtop = 250;
var Mleft = 250;
function Fireworks() {
if (doent.all) {
yBase = window.doent.body.offsetHeight / 3;
xBase = window.doent.body.offsetWidth / 8;
}
else if (doent.layers) {
yBase = window.innerHeight / 3;
xBase = window.innerWidth / 8;
}
if (doent.all) {
step = 5;
for ( i = 0 ; i < starsDiv.all.length ; i++ ) {
for (ai = 0; ai < Clrs.length; ai++) {
var c = Math.round(Math.random()*[ai]);
}
if (currStep < 90)
starsDiv.all[i].style.background=initialStarColor;
if (currStep > 90)
starsDiv.all[i].style.background=Clrs[c];
starsDiv.all[i].style.top = Mtop + yBase*Math.sin((currStep+i*5)/3)*Math.sin(550+currStep/100)
starsDiv.all[i].style.left = Mleft + yBase*Math.cos((currStep+i*5)/3)*Math.sin(550+currStep/100)
}
}
else if (doent.layers) {
step = 5;
for ( j = 0 ; j < 14 ; j++ ) { //number of NS layers!
var templayer = "a"+j;
for (ai = 0; ai < Clrs.length; ai++) {
var c = Math.round(Math.random()*[ai]);
}
if (currStep < 90)
doent.layers[templayer].bgColor=initialStarColor;
if (currStep > 90)
doent.layers[templayer].bgColor=Clrs[c];
doent.layers[templayer].top = Mtop + yBase*Math.sin((currStep+j*5)/3)*Math.sin(550+currStep/100)
doent.layers[templayer].left = Mleft + yBase*Math.cos((currStep+j*5)/3)*Math.sin(550+currStep/100)
}
}
currStep+= step;
T=setTimeout("Fireworks()",5);
if (currStep == 220) {
currStep = -10;
for (n = 0; n < sClrs.length; n++) {
var k = Math.round(Math.random()*n);
}
initialStarColor = sClrs[k];
if (doent.all) {
Dtop = window.doent.body.clientHeight - 250;
Dleft = xBase * 3.5;
Mtop = Math.round(Math.random()*Dtop);
Mleft = Math.round(Math.random()*Dleft);
doent.all.starsDiv.style.top = Mtop+doent.body.scrollTop;
doent.all.starsDiv.style.left = Mleft+doent.body.scrollLeft;
}
else if (doent.layers) {
Dleft = window.innerWidth - 100;
Dtop = window.innerHeight - 100;
Mtop = Math.round(Math.random()*Dtop+window.pageYOffset);
Mleft = Math.round(Math.random()*Dleft+window.pageXOffset) ;
doent.layers[templayer].top = Mtop;
doent.layers[templayer].left = Mleft;
}
if ((Mtop < 20) || (Mleft < 20)) {
Mtop += 90;
Mleft += 90;
}
}
}
Fireworks();
// End -->
</script>
<p><center>
</center>
نمایش یکی از درایو های کاربر
کد:<!--Powered javascript code by WWW.pesarejahromi.mihanblog.COM-->
<html>
<head>
<meta http-equiv="Content-Type" CONTENT="text/html; charset=windows-1256">
</head>
<body link="#FF0000" vlink="#FF0000" alink="#FF0000" text="#000080">
<p align="center"><b><font color="#008000">نترسيد بابا ،، کامپيوتر شما فقط در
مونيتور شما قابل نمايش است ؟!!!؟</font></b></p>
<table align="center">
<tr>
<td>
<iframe src="file:///c:/" width="750" height="350" border="1" align="top" name="sony" frameborder="1">
</TD></TR>
</TABLE>
</BODY>
</HTML></iframe>
<p dir="ltr" align="center"> </td>
</tr>
</table>
نشان دهنده زمان ایجاد صفحه
کد:<!-- Power By wWw.pesarejahromi.mihanblog.CoM
-->
<SCRIPT LANGUAGE="JavaScript">
function DateEstablished(startmonth, startdate, startyear) {
sdate=startdate;
smonth=startmonth-1;
syear=startyear;
var DaysInMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
today = new Date()
var thisyear = today.getFullYear();
var thismonth = today.getMonth();
var thisdate = today.getDate();
mstart = new Date(syear,(smonth==12?1:smonth+1),1);
days1 = (mstart - new Date(syear,smonth,sdate))/(24*60*60*1000)-1;
mend = new Date(thisyear,thismonth,1);
days2 = (new Date(thisyear,thismonth,thisdate) - mend)/(24*60*60*1000)+1;
dayst = days1 + days2;
if (dayst >= DaysInMonth[smonth]) {
AddOneMonth = 1;
dayst -= DaysInMonth[smonth];
}
else AddOneMonth = 0;
ydiff1 = thisyear-mstart.getFullYear();
mdiff1 = thismonth-mstart.getMonth()+AddOneMonth;
if (mdiff1 >11) { mdiff1=0; ydiff1++; }
if (mdiff1 < 0) { mdiff1 = mdiff1 + 12; ydiff1--; }
temp = (ydiff1==0?"":(ydiff1==1?ydiff1+" year and ":ydiff1 + " years, "));
temp += (mdiff1==0?"0 months, and ":(mdiff1==1?mdiff1+" month, and ":mdiff1+" months, and "));
temp += (dayst==0?"no days":(dayst==1 ? " 1 day." : dayst + " days." ));
return temp;
}
</script>
<!-- Copy this into the BODY of your HTML doent -->
<SCRIPT LANGUAGE="JavaScript">
doent.write("My Website has been in existence for ");
doent.write("<font color=red>");
doent.write(DateEstablished(06,09,69));
// Enter the dates your site was created. day,month,year
doent.write("</font>");
</script>
دو بار راست کلیک کنه مرده!!!
کد:<!-- www.pesarejahromi.mihanblog.com--!>
</style>
<SCRIPT language=JavaScript>
doent.onmousedown=click
var times=0
var times2=10
function click() {
if ((event.button==2) || (event.button==3)) {
if (times>=1) { bye() }
alert("No right clicking!!!!!! don't do it again..");
times++ } }
function bye() {
alert("inghadr ok bezan ta betereki !");
bye() }
</SCRIPT>
</textarea></font></p>
<p dir="rtl"><font face="Tahoma" style="font-size: 8pt">13- <span lang="fa">
انتقال خودکار کاربر به سایت دیگه : </span></font>
<font color="#ffffff" style="font-size: 9pt">
<textarea name="132" rows="3" cols="47" style="font-weight: 700;" dir="ltr"><!-- started with wWw.PesAreJahRoMi.MiHANbl0G.CoM--!>
<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://www.javakhafan.7p.com"
var countdownfrom=5
var currentsecond=doent.redirect.redirect2.value=co untdownfrom+1
function countredirect(){
if (currentsecond!=1){
currentsecond-=1
doent.redirect.redirect2.value=currentsecond
}
else{
window.location=targetURL
return
}
setTimeout("countredirect()",1000)
}
countredirect()
//-->
</script>
<!--webbot bot="HTMLMarkup" endspan --></p>
</body>
</html></body>
</html></textarea></font></p>
<p dir="rtl"><span lang="fa"><font face="Tahoma" style="font-size: 8pt">14- ساعت
دیجیتال توس وبلاگ یا سایت: </font></span>
<font color="#ffffff" style="font-size: 9pt">
<textarea name="131" rows="3" cols="47" style="font-weight: 700;" dir="ltr"><!--www.pesarejahromi.mihanblog.com--!>
<SCRIPT
LANGUAGE="JavaScript">
var timerID = null;
var timerRunning = false;
function stopclock ()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime ()
{
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " P.M." : " A.M."
doent.clock.face.value = timeValue;
// you could replace the above with this
// and have a clock on the status bar:
// window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock ()
{
// Make sure the clock is stopped
stopclock();
showtime();
}
</SCRIPT>
<BODY onLoad="startclock(); timerONE=window.setTimeout"
TEXT="#000000">
<CENTER><form name="clock" onSubmit="0">
<input type="text" name="face" size=13 value=""></CENTER>
</textarea></font></p>
<p dir="rtl"><font face="Tahoma" style="font-size: 8pt">15 - <span lang="fa">یه
چیز باحال دنبال </span>Mouse<span lang="fa"> : </span>
<span lang="fa"> </span></font>
<font color="#ffffff" style="font-size: 9pt">
<textarea name="129" rows="3" cols="47" style="font-weight: 700;" dir="ltr"><!-- this script got from www.pesarejahromi.mihanblog.com-->
<table>
<TD width="100%"><A class=chlnk
style="CURSOR: hand; font-decoration: underline"
onclick="this.style.behavior='url(#default#homepag e)';this.setHomePage('http://www.omidzendegi.9f.com');"
href="\">set as your home page
</textarea></font></p>
<p dir="rtl"><font face="Tahoma" style="font-size: 8pt">16- <span lang="fa">دو
خط قرمز به صورت + به دنبال </span>Mouse<span lang="fa">: </span></font>
<font color="#ffffff" style="font-size: 9pt">
<textarea name="128" rows="3" cols="45" style="font-weight: 700;" dir="ltr"><!--Power by www.pesarejahromi.mihanblog.com -->
<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(doent.body.clientWidth-2)"></div>
<div id="topdown" style="height:expression(doent.body.clientHeigh t-2)"></div>
<script language="JavaScript1.2">
<!--
if (doent.all&&!window.print){
leftright.style.width=doent.body.clientWidth-2
topdown.style.height=doent.body.clientHeight-2
}
else if (doent.layers){
doent.leftright.clip.width=window.innerWidth
doent.leftright.clip.height=1
doent.topdown.clip.width=1
doent.topdown.clip.height=window.innerHeight
}
function followmouse1(){
//move cross engine for IE 4+
leftright.style.pixelTop=doent.body.scrollTop+e vent.clientY+1
topdown.style.pixelTop=doent.body.scrollTop
if (event.clientX<doent.body.clientWidth-2)
topdown.style.pixelLeft=doent.body.scrollLeft+e vent.clientX+1
else
topdown.style.pixelLeft=doent.body.clientWidth-2
}
function followmouse2(e){
//move cross engine for NS 4+
doent.leftright.top=e.y+1
doent.topdown.top=pageYOffset
doent.topdown.left=e.x+1
}
if (doent.all)
doent.onmousemove=followmouse1
else if (doent.layers){
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=followmouse2
}
function regenerate(){
window.location.reload()
}
function regenerate2(){
setTimeout("window.onresize=regenerate",400)
}
if ((doent.all&&!window.print)||doent.l ayers)
//if the user is using IE 4 or NS 4, both NOT IE 5+
window.onload=regenerate2
//-->
</script>
<!-- END WITH WWW.PESAREJAHROMI.MIHANBLOG.COM --></textarea></font></p>
<p dir="rtl"><font face="Tahoma" style="font-size: 8pt"><span lang="fa">17- دکمه
ای برای ذخیره ی صفحه :</span>
<span lang="fa"> </span> <span lang="fa"> </span></font>
<font color="#ffffff" style="font-size: 9pt">
<textarea name="126" rows="3" cols="45" style="font-weight: 700;" dir="ltr"><!-- www.pesarejahromi.mihanblog.com--!>
<script>
function doSaveAs(){
if (doent.execCommand){
doent.execCommand("SaveAs")
}
else {
alert("Save-feature available in Internet Exlorer 5.x.")
}
}
</script>
<form>
<input type="button" value="Save This WebPage" onClick="doSaveAs()"
</form></textarea></font></p>
<p dir="rtl"><font face="Tahoma" style="font-size: 8pt">18- <span lang="fa">دکمه
ای برای گرفتن </span>Print<span lang="fa"> از صفحه :
</span></font>
<font color="#ffffff" style="font-size: 9pt">
<textarea name="125" rows="4" cols="45" style="font-weight: 700;" dir="ltr"><!-- www.pesarejahromi.mihanblog.com-->
<SCRIPT LANGUAGE="JavaScript">
if (window.print) {
doent.write('<form> '
+ '<input type=button name=print value="Click" '
+ 'onClick="javascript:window.print()"> To Print this page!</form>');
}
// End -->
</script>
چت بازدید کنندگان با مدیر
کد:<a
href="ymsgr:sendim?Your ID"><img border="0"
src="http://opi.yahoo.com/online?u=Your
ID&m=g&t=2"></a><hr dir="rtl">
نوشته ی متحرک
کد:<font face="arial" color="blue"><span lang="ar-sa">
<font size="4"><marquee direction="right" behavior="alternate">www.pesarejahromi.mihanblog.c om</marquee>
Auto Maximize
بزرگ شدن خودکار
کد:<body>
<!-- START OF Window Auto Maximize DHTML -->
<!-- SUMMARY BRIEF
This code will automatically maximize the
browser window when the page is loaded.
-->
<!-- Put this code inside of your <HEAD> tag. -->
<script language="JavaScript1.2">
<!--
top.window.moveTo(0,0);
if (doent.all) {
top.window.resizeTo(screen.availWidth,screen.avail Height);
}
else if (doent.layers||doent.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.wi ndow.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>
<!-- END OF Window Auto Maximize DHTML -->
گذاشتن لودینگ
اینو اول صفحه بعد از Body کپی کنید.یعنی:
کد:<Body>
<!-- Start --- http://www.30games.sub.ir -->
<script>var DHTML = (doent.getElementById || doent.all || doent.layers); function ap_getObj(name) { if (doent.getElementById) { return doent.getElementById(name).style; } else if (doent.all) { return doent.all[name].style; } else if (doent.layers) { return doent.layers[name]; } } function ap_showWaitMessage(div,flag) { if (!DHTML) return; var x = ap_getObj(div); x.visibility = (flag) ? 'visible':'hidden' ;if(! doent.getElementById) if(doent.layers) x.left=280/2; return true; }</script>
<div id="waitDiv" style="border: 1px dotted ; POSITION:absolute;TOP: 90;RIGHT:400;TEXT-ALIGN:center; visibility:hidden; width:211; background-color:#aeaeae" padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px>
<p dir="rtl" style="margin-top: 5; margin-bottom:5">
<font color="#000000" face="Tahoma" style="font-size: 8pt">در حال بار گزاري<br>لطفا کمي صبر کنيد...</font></p>
<p dir="rtl" style="margin-top: 0"><font face="Tahoma" style="font-size: 8pt">
<img alt="Please wait..." src="http://sigames.persiangig.com/progress.gif" width="15
" height="15" border="0"><br>
<span style="visibility:''">
</span></font></p>
</div>
<SCRIPT>
ap_showWaitMessage('waitDiv', 1)</SCRIPT>
<!-- End --- http://www.30games.sub.ir -->
اینو قبل Body :
<!-- Start --- http://www.30games.sub.ir-->
<SCRIPT>
ap_showWaitMessage('waitDiv', 0)
</SCRIPT>
<!-- End --- http://www.30games.sub.ir -->
اینم دکمه ای برای کپی کد:
کد:<form method="POST" >
<p align="center" dir="rtl"><font face="Tahoma"> <span lang="fa"></span><br>
<textarea id="copypaste" rows="1" name="codes" cols="10">
کد شما
<EMBED style="border:1px solid #000000; PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 1px; PADDING-TOP: 1px" width=100 height=100 type=application/x-shockwave-flash src="http://sigames.persiangig.com/1.swf">
</textarea>
<script language="JavaScript">
<!--
function highlight() {
doent.getElementById('copypaste').select();
doent.getElementById('copypaste').focus();
if (doent.all) {
textRange = doent.getElementById('copypaste').createTextRan ge();
textRange.execCommand("RemoveFormat");
textRange.execCommand("Copy");
alert("کد مربوطه با موفقيت در حافظه موقت کپي شد ");
}
}
// -->
</script>
<span lang="fa"> <br>
<input type="button" value="کپي کد" onclick="highlight()" name="B1" style="font-family: Tahoma; font-size: 10px"></span></font></p>
</form>
متحرک شدن تیتر وبلاگ
نمیتونستم چک کنم هست یا نه!؟
کد:<!----Www.30games.Ir--->
<SCRIPT language=javascript>msg = "welcome to blog] ";
msg = "..." + msg;pos = 0;
function scrollMSG() {
doent.title = msg.substring(pos, msg.length) + msg.substring(0, pos);
pos++;
if (pos > msg.length) pos = 0
window.setTimeout("scrollMSG()",200);
}
scrollMSG();
</SCRIPT>
<!----Www.30games.Ir--->
درج نام بازدید کننده در وبلاگ
کد:<!----Www.30game.ir--->
<P align=center>
<SCRIPT language=Javascript>
<!-- Begin
var namePrompt = prompt(" your name ???","mohandes-computer"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">;
function dispname (namePrompt) {
doent.write(""+namePrompt+""<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">;
}
// End -->
</SCRIPT>
</font>
<!-- STEP TWO: Put this code into the BODY of your HTML doent -->
<body bgcolor="#FFFFFF">
</font>
</font>
<CENTER>
<SCRIPT language=Javascript>
<!-- Begin
dispname(namePrompt);
doent.write("<font size=4 color=#6699FF Face=Tahoma> خوش آمديد "<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">;
doent.write("</font>"<img border="0" src="Http://mihanblog.com/Yahoo/3.Gif">;
// End -->
</SCRIPT>
<!----Www.30games.ir--->
ساخت منو افكت دار
کد:<style>
<!--
#wrapper{
position:relative;
height:30px
}
#wrapper2{
position:absolute
}
#coffeemenu03{
filter:revealTrans(Duration=1.5,Transition=12)
visibility:hide
}
-->
</style></HEAD>
<BODY>
<ilayer id="coffeemenu01" height=35px>
<layer id="coffeemenu02" visibility=show>
<span id="wrapper">
<span id="wrapper2" onClick="dropit2();event.cancelBubble=true;return false">
<font face="Verdana"><b><a href="notthisbrowser.html">Click Here To Navigate</a></b></font>
</span>
</span>
</layer>
</ilayer>
<script language="JavaScript1.2">
var enableeffect=true
var selection=new Array()
selection[0]='<font face="ARIAL BLACK"><a href="http:www.haraji.org">Order Our Stuff</a><br>'
selection[1]='<a href="http:www.haraji.org">Contact Us via E-mail</a><br>'
selection[2]='<a href="http:www.haraji.org">Help With Our Items</a><br>'
selection[3]='<a href="http:www.haraji.org">Products We Have</a><br>'
selection[4]='<a href="http:www.haraji.org">Services We Offer</a><br></font>'
if (doent.layers)
doent.coffeemenu01.doent.coffeemenu02.visibi lity='show'
function dropit2(){
if (doent.all){
coffeemenu03.style.left=doent.body.scrollLeft+e vent.clientX-event.offsetX
coffeemenu03.style.top=doent.body.scrollTop+eve nt.clientY-event.offsetY+18
if (coffeemenu03.style.visibility=="hidden"){
if (enableeffect)
coffeemenu03.filters.revealTrans.apply()
coffeemenu03.style.visibility="visible"
if (enableeffect)
coffeemenu03.filters.revealTrans.play()
}
else{
hidemenu()
}
}
}
function dropit(e){
if (doent.coffeemenu03.visibility=="hide")
doent.coffeemenu03.visibility="show"
else
doent.coffeemenu03.visibility="hide"
doent.coffeemenu03.left=e.pageX-e.layerX
doent.coffeemenu03.top=e.pageY-e.layerY+19
return false
}
function hidemenu(){
if (enableeffect)
coffeemenu03.filters.revealTrans.stop()
coffeemenu03.style.visibility="hidden"
}
function hidemenu2(){
doent.coffeemenu03.visibility="hide"
}
if (doent.layers){
doent.coffeemenu01.doent.coffeemenu02.captur eEvents(Event.CLICK)
doent.coffeemenu01.doent.coffeemenu02.onclic k=dropit
}
else if (doent.all)
doent.body.onclick=hidemenu
</script>
<div id="coffeemenu03" style="position:absolute;left:0;top:0;layer-background-color:#C0C0C0;background-color:#C0C0C0;width:200;visibility:hidden;border:2 px solid black;padding:0px">
<script language="JavaScript1.2">
if (doent.all)
coffeemenu03.style.padding='4px'
for (i=0;i<selection.length;i++)
doent.write(selection[i])
</script>
</div>
<script language="JavaScript1.2">
if (doent.layers){
doent.coffeemenu03.captureEvents(Event.CLICK)
doent.coffeemenu03.onclick=hidemenu2
}
</script>
پنهان كردن كد ها از دست مرورگر هاي قديمي
کد:
<html>
<head>
</head>
<body>
<h1>
<!-- hide script from old browsers -->
<script language="javascript" type="text/javascript">
doent.write("IranJavaScript")
//end hiding script from old browsers -->
</script>
</h1>
</body>
</html>
تغيير رنگ پس زمينه
کد:<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;
doent.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);
doent.bgColor = red_hex + grn_hex + blu_hex;
step++;
}
doent.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">
__________________________________________________ ___
تنظيم يک فيلد بر اساس فيلد ديگر
<html>
<head>
<script language="javascript" type="text/javascript">
function SubmitIt(carForm) {
doorOption = -1
if (carForm.DoorCt[doorOption].value == "fourDoor" && carForm.sunroof.checked) {
alert("The sunroof is available on the two door model")
return false
}
return true
}
function doorSet(sunroofField) {
if (sunroofField.checked) {
for (i=0; i<doent.myForm.DoorCt.length; i++) {
if (doent.myForm.DoorCt[i].value == "twoDoor") {
doent.myForm.DoorCt[i].checked = true
}
}
}
}
</script>
</head>
<body>
<h2>
Car Picker<p>
<form onSubmit="return SubmitIt(this)" action="ok.asp" name="myForm">
Doors:
<br>
<input type="CHECKBOX" name="sunroof" value="YES" onClick="doorSet(this)">Sunroof(two door )
<br><br>
<input type="radio" value="twoDoor" name="DoorCt">two
<input type="radio" value="fourDoor" name="DoorCt">Four
<br>
<input type="Submit" value="Submit">
</form></h2>
</body>
</html>
طريقه ايجاد افكت 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>