منوي
باز شو براي گذاشتن لينک دوستان
خیلی خب. عده زیادی از دوستان در
خواست کرده بودن که کدهای منوی بازشویی رو که من در
اینجا برای گذاشتن لینک دوستان
ازش استفاده کردم براشون بذارم. من هم به خواسته این دوستان
عمل کردم و در این پست به همین
درخواست پاسخ خواهم داد و البته چگونگی گذاشتن لینک ها رو هم در این منو
برای دوستان آموزش میدم.
1.
ابتدا کدهای این منو را درون body قالبتون کپی کنید :
2. بعد از کپی کردن کدهای این
منو در قالب نوبت به گذاشتن لینک هاتون درون اون میرسه.این کاره
بسیار ساده ای است.کافی است
شما برای گذاشتن لینک هاتون فقط مطابق دستورالعملی که در زیر نوشتم عمل کنید:
3.
پس از تکمیل مرحله دوم باستی کل دستور العمل بالا را درون قالب و بعد از متن زیر
قرار دهید تا لینک شما بصورت صحیح در محل خودش قرار بگیره.
4.
برای تغییر دادن پس زمینه این منو مقابل عبارت background-color
نام رنگ یا کد رنگ مورد نظرتون رو بنویسید.
نکته: برای هر بار گذاشتن لینک در این منو بایستی
مجدداً از دستور العمل مرحله دوم استفاده کنید.
توجه داشته باشید ممکنه بعضی از
اسکریپت هایی رو که تاحالا معرفی کردم در بعضی از کامپیوتر ها،
کلمان فارسی آنها بهم ریخته بشه که
بایستی برای جلوگیری از این مشکل صفحتون رو یونیکد کنید .
نویسنده : علی مهاجر
افزودن
ویژگی Send To > NotePad برای کلیه فایل ها
ساعت +
مدت زمان حضور در وبلاگ
مدت
زمان حضور در وبلاگ (۱)
سلام دوستان .
این اسکریپت باعث میشه وقتی که بازدیدکننده قصد ترک کردن وبلاگ رو داشته باشه و
صفحه رو ببنده
پیغامی بهش داده بشه مبنی بر اینکه شما اینقدر ثانیه درون وبلاگ
بودید .
همچنین یک متن رو هم میتونید به این پیغام اضافه کنید .که بصورت پیش فرض متن
"دفعه
بعد بیشتر بمونید" میباشد. برای کاربرد این اسکریپت
که 2 مرحله داره به صورت زیره عمل کنيد:
1.
ابتدا کدهای زیر رو درون head کپی کنید.
2. سپس متن زیر رو به body
قالبتون اضافه کنید.
نویسنده : علی مهاجر
قبل از اینکه کد رو براتون بذارم میخوام به دوستانی
که تمایل به تبادل لینک دارن بگم که شما
میتونید در این پست وبلاگتون رو معرفی
کنید تا در اولین فرصت به شما لینک داده بشه.
ممنونم.
اینم کد متن سایه دار که 2 مرحله داره :
1.
ابتدا این کد رو درون head قالبتون کپی کنید
2.
سپس در مرحله دوم کد زیر رو درون body قالب و جایی که دوست
دارید متن قرار بگیره paste کنید.
برای
ایجاد جمله مورد نظرتون کافیه به جای جمله
wel c ome
to alierfan84
که در مرحله دوم هست متن مورد نظرتون رو قرار بدید. شاید
عده ای دوست داشته باشن سایز
و یا رنگ متن رو تغییر بدن برای تغییر دادن سایز
متن میتونید در جلوی font size اندازه مورد نظرتون رو وارد کنید
و همچنین برای
تغییر دادن رنگ متن بایستی در جلوی color نام رنگ مورد نظر
و یا کد رنگ رو وارد
کنید. به
همین سادگی. امیدوارم که از این کد هم خوشتون بیاد .
موفق و پیروز باشید.
نویسنده : علی مهاجر
این بار میخوام کدی
رو معرفی می کنم که با اون میتونید یه منو در سمت چپ وبلاگ یا
سایتتون داشته باشید.
این منو همراه با اسکرول بار حرکت میکنه و در تمام صفحه همراه شماست.
کد:
نویسنده : علی مهاجر
نویسنده : علی مهاجر
نمایش
یک پیغام در حال جوشیدن در statusbar
امكان چت
بازديدكنندگان وبلاگ با شما
کدی رو که در این پست میخوام معرفی کنم یک منو برای گذاشتن پیام هاتون هست که
البته
اگر کمی ابتکار عمل هم داشته باشید به راحتی متونید از اون استفاده های دیگه ای
هم بکنید .
نویسنده : علی مهاجر
لرزش
صفحه در هنگام ورود به آن
نوشته
شما در استاتوس بار (۱)
خب این بار میخوام کدی در رابطه با استاتوس بار براتون معرفی کنم . این کد باعث
به نمایش دراومدن
جمله شما بصورت کلمه به کلمه میشه و پس از تکمیل ، جمله از استاتوس بار خارج میشه
و این عمل همین طور ادامه پیدا میکنه .البته از این موارد زیاد خواهیم داشت .
اینم
کدش که دارای 2 قسمته . قسمت اول رو همونطور که مشخص کردم درون head
کپی کنید
و اما قسمت دوم: در این مرحله باید
onLoad="scrollIn()" رو درون تگ body قالبتون کپی
کنید . به همین راحتی .
نظر یادتون نره .
موفق باشید
نویسنده : علی مهاجر
لينک و نمايش جمله
تعريفي در نوار وضعيت
وسیله این جاوا
اسکریپت میتوانید برای لینک مورد نظرتان جمله خاصی را تعریف کنید که در هنگام
قرار گرفتن
ماوس بروری آن ، جمله در نوار وضعیت نمایش داده شود.برای تغییر دادن
لینک و
جمله تعریف شده ، میتوانید به جای آن ها، جمله و لینک مورد نظرتان را وارد
کنید.
برای استفاده از این اسکریپت کدهای زیر را درون Body
قالب کپی کنید:
نویسنده : علی مهاجر
متن
متحرک در نوار وضعيت (۳)
ت وسط این اسکریپت میتوانید
در نوار وضعیت صفحه جملاتی را به نمایش در آورد .
نحوه نمایش جملات بدین صورت
میباشد که ابتدا از هر جمله کلمات آن جمله بصورت تک تک و با سرعتی زیاد نمایش
داده شده
و پس از پایان آن جمله مورد نظر به طور کامل نشان داده میشود
و
با مکثی کوتاه جمله بعد نیز مراحل قبل را طی میکند. کدهای زیر
را درون Body قالب کپی کنید :
به طور پیش فرض برای این اسکریپت 4 جمله تعیین شده است .
چنانچه تمایل داشته باشید تعداد
جملات را افزایش دهید بایستی مراحل زیر را طی کنید:
1. ابتدا عدد مقابل جمله زیر
را که 4 میباشد به عدد 5 تغییر دهید.(توجه داشته باشید که شمارش اعداد در
اینجا از صفر شروع میشود.)
action = new initArray(4)
2. سپس تابع 1 را بعد از تابع 2 کپی کنید.
1.
action[4 ]=""
2.
action[3]=""
3. در این مرحله
بایستی جمله مرود نظر خود را بین دو علامت " و "
تایپ کنید.
4. حالا میتوانید اسکریپت را تست کنید و نتیجه را ببینید.
نویسنده : علی مهاجر
نمايش گوشه اي از جزئيات سيستم بازديدکننده
بوسیله این اسکریپت توانایی نمایش : نوع مرورگر، نگارش
مرورگر، وضوح نمایشگر و فعال یا غیر فعال
بودن جاوا در سیستم بازدید کننده به او
داده شود.برای استفاده از این اسکریپت کافیست کدهای زیر را درون
Body قالب و در جای مناسب کپی کنید:
نویسنده : علی مهاجر
بوسیله این اسکریپت
که برای عده ای از دوستان آشنا میباشد میتوان توانایی کلیک راست را از میان
برداشت.
جمله پیش فرض این اسکریپت که هنگام فشردن کلیک راست در
صفحه به بازدید کننده نشان داده میشود " ha
ha ha ha" میباشد.
برای تغییر دادن آن در اسکریپت به
دنبال آن گشته و جمله مورد نظر خود را جایگزین آن کنید.
برای استفاده از
این اسکریپت کدهای زیر را درون Body قالب کپی کنید .
نویسنده : علی مهاجر
با
استفاده از این اسکریپت ميتوان سه رنگ قرمز، آبی و سبز را بدنبال ماوس حرکت داده
و حرکتی
ستاره مانند ایجاد کرد. برای بکار گیری این اسکریپت کدهای زیر را درون
Body قالب کپی کنید.
نویسنده : علی مهاجر
متن
چشمک زن در نوار وضعيت
این
اسکریپت متنی را در نوار وضعیت بصورت چشمک زن بنمایش در می آورد . توجه داشته
باشید که برای
این اسکریپت توانایی تعیین کردن فقط یک جمله جود دارد . بمنظور
نمایش جمله دلخواه خود میتوانید
جمله پیش فرض آن را که جمله "Welcome to
AliErfan84.Blogfa.com" میباشد پیدا کرده و آن را
جایگزین این جمله کنید. برای
استفاده از این اسکریپ میبایست کد های زیر را درون Head
کپی کنید .
نویسنده : علی مهاجر
این
اسکریپت توانایی سوال کردن از بازدید کننده را به شما میدهد . بدین صورت که در
هنگام ورود ،
سوالی در صفحه ظاهر میشود که بازدید کننده توانایی لغو آن را نیز
دارد. برای تغییر سوال این اسکریپت میتوانید ،
سوال پیش فرض آن را در میان کدهای
این اسکریپت یافته و آن را تغییر دهید .
برای استفاده از این اسکریپت کدهای موجود
را در Body قالب کپی کنید.
نویسنده : علی مهاجر
وسیله این اسکریپت قادر خاهید بود جمله خاصی را بصورت عمودی
بنمایش درآورید . بمنظور نمایش جمله
مد نظرتان میتوانید جمله تعیین شده برای این
اسکریپت را بیابید و آن را جایگزین کنید . سایز قلم این ایکریپت بصورت
پیش فرض
6 میباشد که براحتی میتوانید سایز موردنظرتان را بجای آن
وارد کنید . همچنین
بمنظور تغییر رنگ جمله میبایست کد رنگ یا نام رنگ را در مقابل
کلمه Color وارد کنید .
نویسنده : علی مهاجر
وسیله این اسکریپت
میتوان کادری را ایجاد کرد که متن دلخواه شما در این کادر از سمت چپ به سمت راست
حرکت میکند و به این حرکت خود ادامه خواهد داد و هرگز نخواهد ایستاد. برای تغییر
متن درون این کادر
میتوانید به جای جمله پیش فرض آن"Hello
and wellcome to my weblog ": جمله
مورد نظر خود را جایگزین کنید .
توجه داشته باشید که فاصله آخرین کلمه تا علامت "
بایستی فاصله ای کمتر از فاصله پیش فرض آن نباشد
تا در صورت نمایش کامل متن در
کادر این فاصله نیز بنمایش درآید و از نمایش پشت سر هم
جمله جلوگیری شود .
(در هنگام تست کردن این اسکریپت متوجه این امر خواهید شد.)
برای بکارگیری این اسکریپت کدهای زیر را درون Body
قالب کپی کنید .
نویسنده : علی مهاجر
این اسکریپت یک ساعت
عقربه دار میباشید که در سمت راست و پایین صفحه قرار میگیرد و همرا با
حرکت
اسکرول بار(نوار پیمایش) ، حرکت کرده و همچنان محل قرار گرفتن خود را حفظ میکند.
برای استفاده از این ساعت میتوانید کدهای زیر را درون Body
قالب وبلاگ یا وب سایتتان کپی کنید:
نویسنده : علی مهاجر
Run Background حرکت عکس پس زمينه سايت
نویسنده : علی مهاجر
تغيير و
کنترل منو ، آدرس ، سايز و .... در صفحه بعد از لينک
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript">
function goVisitSite(Site)
{
NewWindow = window.open(Site,
"viewwin",
" toolbar=no, scrollbars=yes, menubar=no, status=yes, resizable=yes, directories=no, width=00, height=430 ");
}</script>
<p> </p>
<div style="position: absolute; top: 47; left: 96; width: 175; height: 38">
<p align="center" dir="ltr"><b><font face="Tahoma">
<a href="JavaScript:goVisitSite('http://www.javacity.co.sr/dollar.htm')">
Click Here for link</a></font><br>
</b>
</p>
</div>
<p align="left"> </p>
<div style="position: absolute; top: 92; left: 9; width: 351; height: 38">
<p align="center" dir="ltr">Please Change Java script code on the Source mode</div>
<div style="position: absolute; top: 134; left: 26; width: 320; height: 32">
<p align="center"><span lang="fa">
<font face="Tahoma" size="2" color="#000080">(</font></span><font color="#000080" size="2" face="Tahoma">
<span lang="fa">کد را در حالت سورس تنظيم کنيد ( قسمت کد جاوا</span></font></div>
<!--END CODE - Powered java script code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
نمايش يک
پنجره اضافي ( پاپ آپ ) هنگام باز شدن صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<!-- ************************** START CODE FOR POP UP ************************ -->
<body>
<script>
window.open("http://www.javacity.co.sr/music2.htm",'2','resizable=yes,directories=no,menubar=no,top=null,left=00, width=250,height=40')
</script>
</body>
</html>
<!-- ************************** END CODE FOR POP UP WINDOW ************************ -->
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
از کار انداختن کليک راست موس + قطع قابليت نمايش سورس صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script language=JavaScript>m='%3Cscript%20language%3DJavaScript%3E%3C%21--%0D%0A%0D%0Avar%20message%3D%22SORRY : %20 %21%22%3B%0D%0A%0D%0Afunction%20clickIE%28%29%20%20%7Bif%20%28document.all%29%20%7Balert%28message%29%3Breturn%20false%3B%7D%7D%0D%0Afunction%20clickNS%28e%29%20%7Bif%20%0D%0A%28document.layers%7C%7C%28document.getElementById%26%26%21document.all%29%29%20%7B%0D%0Aif%20%28e.which%3D%3D2%7C%7Ce.which%3D%3D3%29%20%7Balert%28message%29%3Breturn%20false%3B%7D%7D%7D%0D%0Aif%20%28document.layers%29%20%0D%0A%7Bdocument.captureEvents%28Event.MOUSEDOWN%29%3Bdocument.onmousedown%3DclickNS%3B%7D%0D%0Aelse%7Bdocument.onmouseup%3DclickNS%3Bdocument.oncontextmenu%3DclickIE%3B%7D%0D%0A%0D%0Adocument.oncontextmenu%3Dnew%20Function%28%22return%20false%22%29%0D%0A%0D%0A//%20--%3E%3C/script%3E';d=unescape(m);document.write(d);</script>
نویسنده : علی مهاجر
حرکت خودکار اسکرول صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script language="JavaScript1.2">
var currentpos=0,alt=1,curpos1=0,curpos2=-1
function initialize(){
startit()
}
function scrollwindow(){
if (document.all)
temp=document.body.scrollTop
else
temp=window.pageYOffset
if (alt==0)
alt=1
else
alt=0
if (alt==0)
curpos1=temp
else
curpos2=temp
if (curpos1!=curpos2){
if (document.all)
currentpos=document.body.scrollTop+1
else
currentpos=window.pageYOffset+1
window.scroll(0,currentpos)
}
else{
currentpos=0
window.scroll(0,currentpos)
}
}
function startit(){
setInterval("scrollwindow()",10)
}
window.onload=initialize
</script>
نویسنده : علی مهاجر
باز شدن لينک فقط با اشاره موس
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script>
function winopen(){
win = window.open("http://www.google.com", "newWin", "toolbar=yes,location=yes,directories=no,status=no, menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=700,height=360")
openwindow()
}
function openwindow(){}
</script>
<a href="" onMouseOver="winopen();return false;">YOUR LINK NAME</a>
نویسنده : علی مهاجر
نمايش صفحه طی یک مدت معين با لينک
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script>
function winopen(){
win = window.open("http://www.google.com", "newWin", "toolbar=yes,location=yes,directories=no,status=no, menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=400,height=260")
startTime()
}
function startTime(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=3; // Amount of time that the window stays open in seconds
Timer();
}
function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs
if (curTime>=closeTime){
if (win.closed == false){
win.close()}}
else{
window.setTimeout("Timer()",8000)}
}
</script>
<a href="" onMouseOver="winopen();return false;">YOUR LINK NAME</a>
نویسنده : علی مهاجر
نمايش صفحه طی یک مدت معين با کليد باتون
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script>
function winopen(){
win = window.open("http://www.google.com", "newWin", "toolbar=yes,location=yes,directories=no,status=no, menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=400,height=260")
startTime()
}
function startTime(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=3; // Amount of time that the window stays open in seconds
Timer();
}
function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs
if (curTime>=closeTime){
if (win.closed == false){
win.close()}}
else{
window.setTimeout("Timer()",7000)}
}
</script>
<form><input type=button value="YOUR BUTTON NAME" onClick="winopen();"></form>
نویسنده : علی مهاجر
پيغام ترک صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide from JavaScript-Impaired Browsers
locnm=location.href;
pos=locnm.indexOf("indexb.htm");
locnm1=locnm.substring(0,pos);
function ByeWin() {
windowIMA=window.open("",'Anim2','toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,status=no,resizable=1,width=310,height=290')
windowIMA.document.write("<HTML><TITLE>BYE BYE</TITLE>"
+"<BODY BGCOLOR='black' text= 'white'><CENTER>"
+"<FORM METHOD=GET ACTION='"+locnm1+"h5s3.html'>"
+"<P><B>Good bye.!<P>Thanks for visiting MY SITE !<BR>"
+"Please add your own html text here"
+"<BR>Website Abstraction bids you farewell</B></FORM><BR>");
}
// End Hiding -->
</SCRIPT>
<BODY onUnload="ByeWin()">
نویسنده : علی مهاجر
تعیين
مشخصات ظاهری صفحه بعدی ( لينک شده با عکس
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script language="JavaScript">
function goVisitSite(Site)
{
NewWindow = window.open(Site,
"viewwin",
"toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,status=no,resizable=yes,width=null,height=null");
}
</script>
<p> <p> <p><br>
<p><span style="position: absolute; left: 420; top: 207"><a href="JavaScript:goVisitSite('http://www.javacity.co.sr')"><font size="4">
<img border="0"
src="http://www.javacity.co.sr/danger.gif" width="96" height="67"></font></a></span></p>
نویسنده : علی مهاجر
نمايش دو صفحه اضافی ( پاپ آپ ) بعد از لينک
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script language="JavaScript">
function winopen(){
window.open('http://www.google.com', 'NewWindow1', 'toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=635,height=260')
window.open('http://AliErfan84.Blogfa.com', 'NewWindow2', 'toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=no,copyhistory=yes,width=635,height=260')
}
</script>
<a ONCLICK="winopen()" href="http://AliErfan84.Blogfa.com">LINK NAME</a>
نویسنده : علی مهاجر
نمايش يک صفحه اضافی (پاپ آپ ) بعد از لينک
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script language="JavaScript">
function winopen(){
window.open('http://www.google.com', 'NewWindow1', 'toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=635,height=260')
}
</script>
<a ONCLICK="winopen()" href="http://AliErfan84.Blogfa.com">LINK NAME</a>
نویسنده : علی مهاجر
برگشت خودکار صفحه فعلی به صفحه قبل
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<meta http-equiv="Content-Language" content="en-us">
<SCRIPT LANGUAGE="JavaScript">
<!--//hiding it
setTimeout("history.back();", 15000);
//end hiding it-->
</SCRIPT>
<p>asd</p>
نویسنده : علی مهاجر
بستن يك آي پي و جلوگيري
از ورود آن به سايت
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<html>
<body bgcolor=ffffff>
<script language="javascript">
var ip = '24.0.217.223'
if (ip == '206.186.23.178') {
alert("STOP! You are viewing this page from an IP address that is not allowed!");
alert("Why can't you guys just leave me alone?");
if (confirm("Do you want to leave peacefully? Or will I have to help you?"))
{location.href="http://www.mydesktop.com" } else { ("OK you choose I don't care! Bye bye! Don't come back!"); {location.href="http://www.mydesktop.com" }} }
</SCRIPT>
</body>
</html>
نویسنده : علی مهاجر
بسته شدن
خودکار صفحه بعد از يک مدت معين
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<meta http-equiv="Content-Language" content="en-us">
<SCRIPT LANGUAGE="JavaScript">
<!--//hiding it
setTimeout("window.close();", 15000);
//end hiding it-->
</SCRIPT>
نویسنده : علی مهاجر
لرزش موقت
در صفحه سايت
<!-- START CODE Powered javascript code by http://AliErfan84.Blogfa.com-->
<meta http-equiv="Content-Language" content="en-us">
<SCRIPT language=JavaScript>
<!-- Begin
function shake(n) {
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);
}
}
}
}
// End -->
<!--
shake(1);
//-->
</SCRIPT>
<p align="center"><font size="7" color="#FF0000">salam irani</font></p>
<!-- END CODE Powered javascript code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
با تنظيم
اندازه (windows media ) wma پخش آهنگهای با فرمت
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<body>
<!-- Begin Music -->
<p>
<embed "1" TYPE="application/x-mplayer2" SRC="http://www.arianmusic.com/music/arian2/winMedia/parvaz.wma" autostart="true" WIDTH="350" HEIGHT="250"></embed>
<tr>
<td></p>
<div style="position: absolute; top: 284; left: 78; width: 165; height: 12">
<p dir="ltr"><span lang="fa"><font face="Tahoma" size="1" color="#000080">
کيفيت موسيقي متن بستگي به</font></span></div>
<div style="position: absolute; top: 300; left: 87; width: 133; height: 12">
<p dir="ltr"><span lang="fa"><font face="Tahoma" size="1" color="#000080">سرعت
شما در اينترنت دارد</font></span></div>
<div ALIGN="center">
</td>
</div>
</body>
</html>
نویسنده : علی مهاجر
موجود در
کامپيوتر Real Player پخش آهنگ در صفحه با
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script LANGUAGE="JavaScript">
// You must ask before you use this script //
song = new Array(2);
title = new Array(2);
song[1] ='http://www.arianmusic.com/music/arian2/realPlayer/arian2_t1Parvaz.rm'
title[1] = 'ARIAN Parvaz'
song[2] ='http://www.arianmusic.com/music/arian1/realPlayer/arian1_t6MolaAli.rm'
title[2] = 'ARIAN Mola Ali'
index = Math.floor(Math.random() * song.length);document.write("<DL>\n");
document.write("<EMBED SRC="+song[index]+" width=275 height=45 autostart=true loop=infinite BGCOLOR='#000000'");
document.write(' TEXT="#FFFFFF">');
document.write("<BR>");
document.write(" ");
document.write("<font size=1 color=red>");
document.write(title[index]);
document.write("</font>")
document.write("</DL>\n");
</script>
</body>
</html>
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
پخش آهنگ جديد طبق هر روز
<!--Powered javas cript code by http://AliErfan84.Blogfa.com-->
<body>
<center>
<script LANGUAGE="JavaScript">
page=new Date();
if (page.getDate() == 1)
document.write("<embed src=song1.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 2)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/1979.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 3)
document.write("<embed src=song3.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 4)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/always.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 5)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/bcuz.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 6)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/bhcop.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 7)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/bomb.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 8)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/bone.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 9)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/californa.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 10)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/class.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 11)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/clown.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 12)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/dag.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 13)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/danger.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 14)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/dontlokb.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 15)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/eagle.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 16)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/enter.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 17)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/ff.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 18)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/ftloose.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 19)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/funk.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 20)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/gangsta.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 21)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/gilligan.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 22)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/hawaii50.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 23)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/hotelcal.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 24)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/indiana.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 25)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/ironic.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 26)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/jaws.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 27)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/jeremy.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 28)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/killing.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 29)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/stupdgrl.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 30)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/today.mid width=145 height=60 autostart=true volume=50>");
if (page.getDate() == 31)
document.write("<embed src=http://www.xkiller.simplenet.com/midis/x-files.mid width=145 height=60 autostart=true volume=50>");
page=new Date();
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var dateObj = new Date()
var lmonth = months[dateObj.getMonth() + 1]
var fyear = "" + dateObj.getYear()
var date = dateObj.getDate()
document.write("<br>" + lmonth + " " + date + ", " + fyear)
//done hiding -->
</script>
</center>
<p><br>
</p>
</body>
</html>
<!--Powered java script code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
انتخاب نوع آهنگ صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<body>
<p><br>
<script LANGUAGE="JavaScript">
<!--
function PlaySong(SongURL)
{
PopUp = window.open (SongURL, "Crescendo", "toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizeable=no,copyhistory=no,width=200,height=30")
}
//-->
</script>
<br>
</p>
<form NAME="midiform">
<p><select NAME="list">
<option VALUE="http://www..........com/sellout.Mid" [SELECTED]>ey IRAN
</option>
<option VALUE="http://www..........com/govt.mid">Tavalood</option>
<option VALUe="http://www..........com/damnit.mid">Baba karam</option>
</select> </p>
<p>
<input TYPE="BUTTON" VALUE="PLAY MIDI" onClick="PlaySong(midiform.list.options[midiform.list.selectedIndex].value)">
</p>
</form>
</body>
</html>
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
Status Bar چشمک يک پيغام در پائين صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script>
var yourwords = "YOUR MESSAGE HERE ( SONY CARD 20 ) ";
var speed = 300;
var control = 1;
function flash()
{
if (control == 1)
{
window.status=yourwords;
control=0;
}
else
{
window.status="";
control=1;
}
setTimeout("flash()",speed);
}
</script>
<!--Now put this inside your body code.-->
<html>
<head>
<title>New Page 3</title>
</head>
<body onLoad="flash()">
</body>
</html>
نویسنده : علی مهاجر
Status
Bar نمايش ساعت در پائين صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<html>
<head>
<title>Digital Clock - Status Bar</title>
<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."
window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock () {
stopclock();
showtime();
}
</script>
</head>
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080"
onLoad="startclock()">
</body>
</html>
نویسنده : علی مهاجر
Status Bar نمايش ساعت ، روز و تاريخ در پائين صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<HTML>
<HEAD>
<TITLE>Clock And Date</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide JavaScript From Java-Impaired Browsers
var timerID = null
var timerRunning = false
function MakeArray(size)
{
this.length = size;
for(var i = 1; i <= size; i++)
{
this[i] = "";
}
return this;
}
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false
}
function showtime () {
var now = new Date();
var year = now.getYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var day = now.getDay();
Day = new MakeArray(7);
Day[0]="SUN";
Day[1]="MON";
Day[2]="TUE";
Day[3]="WED";
Day[4]="THU";
Day[5]="FRI";
Day[6]="SAT";
var timeValue = "";
timeValue += (Day[day]) + " ";
timeValue += ((month < 10) ? " 0" : " ") + month + "-";
timeValue += date + "-" + year + " ";
timeValue += ((hours <= 12) ? hours : hours - 12);
timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
timeValue += (hours < 12) ? " AM" : " PM";
window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true
}
function startclock () {
stopclock();
showtime()
}
// End Hiding -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080" onLoad="startclock();">
نویسنده : علی مهاجر
Bar نمايش پيغام به صورت حرف به حرف در پائين صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<html>
<head>
<title>Cool Status Bar Scroller</title>
<script LANGUAGE="JavaScript">
<!--
function snapIn(jumpSpaces,position) {
var msg = "YOUR MESSAGE GOES HERE !!! ........ SONY CARD 20 . COM"
var out = ""
if (killScroll) {return false}
for (var i=0; i<position; i++){
out += msg.charAt(i)}
for (i=1;i<jumpSpaces;i++) {
out += " "}
out += msg.charAt(position)
window.status = out
if (jumpSpaces <= 1) {
position++
if (msg.charAt(position) == ' ') {
position++ }
jumpSpaces = 100-position
}
else if (jumpSpaces > 3) {
jumpSpaces *= .75}
else {
jumpSpaces--}
if (position != msg.length) {
var cmd = "snapIn(" + jumpSpaces + "," + position + ")";
scrollID = window.setTimeout(cmd,5);
}
else {
scrolling = false
return false
}
return true
}
function snapSetup() {
if (scrolling)
if (!confirm('Re-initialize snapIn?'))
return false
killScroll = true
scrolling = true
var killID = window.setTimeout('killScroll=false',6)
scrollID = window.setTimeout('snapIn(100,0)',10)
return true
}
var scrollID = Object
var scrolling = false
var killScroll = false
// -->
</script>
</head>
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080"
onLoad="snapSetup()">
</body>
</html>
نویسنده : علی مهاجر
نمايش چندين پيغام به صورت تايپ شدن در پائين صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script LANGUAGE="JavaScript">
<!--
var speed = 50 // decrease value to increase speed (must be positive)
var pause = 2500 // increase value to increase pause
var timerID = null
var bannerRunning = false
var ar = new Array()
ar[0] = "Welcome to JAVA SCRIPT CODE .... "
ar[1] = "POWERED BY WWW . SONY CARD 20 . COM ..... "
ar[2] = "Enjoy my Friend "
ar[3] = "********** Sony Card 20 . com *********** "
var currentMessage = 0
var offset = 0
function stopBanner() {
if (bannerRunning)
clearTimeout(timerID)
bannerRunning = false
}
function startBanner() {
stopBanner()
showBanner()
}
function showBanner() {
var text = ar[currentMessage]
if (offset < text.length) {
if (text.charAt(offset) == " ")
offset++
var partialMessage = text.substring(0, offset + 1)
window.status = partialMessage
offset++
timerID = setTimeout("showBanner()", speed)
bannerRunning = true
} else {
offset = 0
currentMessage++
if (currentMessage == ar.length)
currentMessage = 0
timerID = setTimeout("showBanner()", pause)
bannerRunning = true
}
}
// -->
</script>
</head>
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080" onLoad="startBanner()">
</body>
</html>
نویسنده : علی مهاجر
نمايش پيغام روز بخير طبق زمان روز
<!--Powered javas cript code by http://AliErfan84.Blogfa.com-->
<!-- ONE STEP TO INSTALL TIME MESSAGE:
1. Add the coding into the BODY of your HTML document -->
<!-- STEP ONE: Put this code into the BODY of your HTML document -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>
<body>
<center>
<script LANGUAGE="JavaScript">
<!--Total Java Scripts 99 - Next Step Software-->
<!-- Begin
document.write("<center><font size=+1>")
day = new Date()
hr = day.getHours()
if (hr ==1)
document.write("بامداد بخير ")
if (hr ==2)
document.write("نيمه شب شما بخير")
if (hr ==3)
document.write("نيمه شب شما بخير .... نميروی بخوابي")
if (hr ==4)
document.write("ساعت 4 صبح شده برو بخواب")
if (hr ==5)
document.write("سحر بخير")
if (hr ==6)
document.write("صبح زود شما بخير")
if ((hr == 6) || (hr ==7) || (hr ==8) || (hr == 9) || (hr ==10))
document.write("صبح بخير")
if (hr ==11)
document.write("نيمروز بخير")
if (hr ==12)
document.write("ظهر بخير")
if (hr ==13)
document.write("بعد از ظهر شما بخير")
if ((hr==15) || (hr==16) || (hr==14))
document.write("عصر شما بخير")
if ((hr==17) || (hr==18) || (hr==19) || (hr==20) || (hr==21) || (hr==22))
document.write("شب بخير")
if (hr==23)
document.write("شب شما بخير")
if (hr==0)
document.write("نيمه شب بخير")
document.write("</font></center>")
// End -->
</script>
</center>
<!-- Script Size: 1.76 KB -->
</body>
</html>
<!-- END CODE - Powered java script code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
تغيير نمايش چندين بنر يا عکس به همراه لينک آن بنر تبليغات
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<script language="JavaScript">
<!-- Hide from old browsers
var i = 1;
//This is where you load your banners change logo220.Gif to your banner name
banner1= new Image();
banner1.src = "http://www.javacity.co.sr/logo220.gif";
banner2 = new Image();
banner2.src = "http://www.javacity.co.sr/anim44.gif";
banner3 = new Image();
banner3.src = "http://www.javacity.co.sr/baneratr.gif";
//This where you make your links for the banners banners1 is linked to links[1]
links = new Array
links[1] = "http://www.javacity.co.sr/domain.htm"
links[2] = "http://www.namafilm.com"
links[3] = "http://www.isbps.com/"
//This will show up on the status bar when the mouse is moved over the banner
description = new Array
description[1] = "DOMAIN NAD HOSTING BY SONY CARD 20"
description[2] = "BEST SITE ...... Click Here"
description[3] = "Tozihat site"
function startTime(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=11;
Timer();
}
function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs
if (curTime>=closeTime){
if (i < 3){
i++;
document.banner.src = eval("banner" + i + ".src");
}
else{
i = 1;
document.banner.src = eval("banner" + i + ".src");
}
startTime();
}
else{
window.setTimeout("Timer()",1000)}
}
function clickLink(){
top.location = links[i]
}
function descript(){
window.status = description[i]
}
// -->
</script>
</head>
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080" onLoad="startTime();">
<h2 align="center">Exchange Banner</h2>
<a target="_blank" href onClick="clickLink(); return false;" onMouseOver="descript(); return true;" onMouseOut="window.status=''">
<p align="center">
<img src="http://www.javacity.co.sr/logo220.gif" href="http://www.javacity.co.sr/domain.htm" border="0" name="banner" width="468" height="60"></a><br>
</p>
<p align="center"> </p>
</body>
</html>
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
ايجاد منوی توضيحات
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<!-- TWO STEPS TO INSTALL MENU MESSAGE:
1. Add the specified code into the BODY of your HTML document
2. Put the last code into the HEAD of your HTML document -->
<!-- STEP ONE: Put this code into the BODY of your HTML document -->
<script LANGUAGE="JavaScript">
<!-- Original: Stephanie M. Clarkson (thespian@sleepingcat.com) -->
<!-- Web Site: http://www.sleepingcat.com -->
<!--Total Java Scripts 99 - Next Step Software-->
<!-- Begin
var messages = new Array(6);
messages[0] = "";
messages[1] = "SONY CARD 20 IS BEST SITE AT ALL IRANIAN SITE";
messages[2] = "Can you imagine how you could use it on your site?";
messages[3] = "It's great for sharing lots of information.";
messages[4] = "And doesn't take up much space! ";
messages[5] = "So, get the code and put it on your site!";
function messageReveal() {
var messageindex = document.messageForm.messagePick.selectedIndex
document.messageForm.messageField.value = messages[messageindex];
}
// End -->
</script>
<!-- STEP TWO: Put this code into the BODY of your HTML document -->
<body>
<center>
<form name="messageForm">
<p><select name="messagePick" OnChange="messageReveal()">
<option value="0">The Menu Message</option>
<option>SONY CARD 20</option>
<option>Possible uses?</option>
<option>Shares Information</option>
<option>Saves space</option>
<option>Get the code!</option>
</select> <br>
</p>
<p><textarea name="messageField" rows="5" cols="41" wrap="virtual">
نویسنده : علی مهاجر
پرواز
پروانه در سايت
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>
<body>
<p>
<script language="JavaScript1.2">
//specify path to cursor image
var cursorpath="http://www.sonycard20.com/fly2.gif"
if (document.layers)
{document.write("<LAYER NAME='PoInTeRs' LEFT=800 TOP=10><img src='"+cursorpath+"' width=17 height=22></LAYER>")}
else if (document.all){document.write("<div id='pOiNtErS' style='position:absolute;top:10px;left:10px;width:17px;height:22px;z-index:50'><img src='"+cursorpath+"' width=40 height=40></div>")}
count=-1;
move=1;
function Curve(){
abc=new Array(0,1,1,1,2,3,4,0,6,-1,-1,-1,-2,-3,-4,0,-6)
for (i=0; i < abc.length; i++)
{var C=Math.round(Math.random()*[i])}
howbend=abc[C];
setTimeout('Curve()',1900);
return howbend;
}
ypos=100;
xpos=100;
degree = 600;
function MoveRandom(){
PathBend=degree+=howbend;//ok!
y = 4*Math.sin(PathBend*Math.PI/180);
x = 6*Math.cos(PathBend*Math.PI/180);
if (document.layers){
ypos+=y;
xpos+=x;
document.PoInTeRs.top=ypos+window.pageYOffset;
document.PoInTeRs.left=xpos+window.pageXOffset;
}
else if (document.all){
ypos+=y;
xpos+=x;
document.all.pOiNtErS.style.top=ypos+document.body.scrollTop;
document.all.pOiNtErS.style.left=xpos+document.body.scrollLeft;
}
T=setTimeout('MoveRandom()',50);
}
function edges(){
if (document.layers){
if (document.PoInTeRs.left >= window.innerWidth-40+window.pageXOffset)degree=Math.round(Math.random()*45+157.5);
if (document.PoInTeRs.top >= window.innerHeight-30+window.pageYOffset)degree=Math.round(Math.random()*45-112.5);
if (document.PoInTeRs.top <= 2+window.pageYOffset) degree = Math.round(Math.random()*45+67.5);//OK!
if (document.PoInTeRs.left <= 2+window.pageXOffset) degree = Math.round(Math.random()*45-22.5);//OK!
}
else if (document.all)
{
if (document.all.pOiNtErS.style.pixelLeft >= document.body.offsetWidth-45+document.body.scrollLeft)degree=Math.round(Math.random()*45+157.5);
if (document.all.pOiNtErS.style.pixelTop >= document.body.offsetHeight-35+document.body.scrollTop)degree=Math.round(Math.random()*45-112.5);
if (document.all.pOiNtErS.style.pixelTop <= 2+document.body.scrollTop) degree = Math.round(Math.random()*45+67.5);//OK!
if (document.all.pOiNtErS.style.pixelLeft <= 2+document.body.scrollLeft) degree = Math.round(Math.random()*45-22.5);//OK!
}
setTimeout('edges()',100);
}
function starteffect(){
Curve();
MoveRandom();// onUnload="opener.gO()"
edges();
}
if (document.all||document.layers)
window.onload=starteffect
</script>
</p>
</body>
</html>
<!--END CODE - Powered java script code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
حرکت
موزون عکس به دنبال موس
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body>
<div id="dot0" style="position: absolute; visibility: hidden; height: 11; width: 11">
<img src="bullet.gif" height="11" width="11">
</div>
<div id="dot1" style="position: absolute; height: 11; width: 11">
<img src="http://www.sonycard20.com/fly2.gif" height="40" width="40">
</div>
<div id="dot2" style="position: absolute; height: 11; width: 11">
<img src="http://www.sonycard20.com/fly2.gif" height="20" width="20">
</div>
<div id="dot3" style="position: absolute; height: 11; width: 11">
<img src="http://www......YOUR%20IMAGE%20.gif" height="11" width="11">
</div>
<div id="dot4" style="position: absolute; height: 11; width: 11">
<img src="bullet.gif" height="11" width="11">
</div>
<div id="dot5" style="position: absolute; height: 11; width: 11">
<img src="bullet.gif" height="11" width="11">
</div>
<div id="dot6" style="position: absolute; height: 11; width: 11">
<img src="bullet.gif" height="11" width="11">
</div>
<script LANGUAGE="JavaScript">
<!-- hide code
//Elastic Trail script (By Philip Winston @ pwinston@yahoo.com, URL: http://www.geocities.com/pwinston/)
var nDots = 7;
var Xpos = 0;
var Ypos = 0;
// fixed time step, no relation to real time
var DELTAT = .01;
// size of one spring in pixels
var SEGLEN = 10;
// spring constant, stiffness of springs
var SPRINGK = 10;
// all the physics is bogus, just picked stuff to
// make it look okay
var MASS = 1;
// Positive XGRAVITY pulls right, negative pulls left
// Positive YGRAVITY pulls down, negative up
var XGRAVITY = 0;
var YGRAVITY = 50;
// RESISTANCE determines a slowing force proportional to velocity
var RESISTANCE = 10;
// stopping criterea to prevent endless jittering
// doesn't work when sitting on bottom since floor
// doesn't push back so acceleration always as big
// as gravity
var STOPVEL = 0.1;
var STOPACC = 0.1;
var DOTSIZE = 11;
// BOUNCE is percent of velocity retained when
// bouncing off a wall
var BOUNCE = 0.75;
var isNetscape = navigator.appName=="Netscape";
// always on for now, could be played with to
// let dots fall to botton, get thrown, etc.
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)
}
// set their positions
for (i = 0; i < nDots; i++) {
dots[i].obj.left = dots[i].X;
dots[i].obj.top = dots[i].Y;
}
if (isNetscape) {
// start right away since they are positioned
// at 0, 0
startanimate();
} else {
// let dots sit there for a few seconds
// since they're hiding on the real bullets
setTimeout("startanimate()", 1000);
}
}
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);
}
// This is to line up the bullets with actual LI tags on the page
// Had to add -DOTSIZE to X and 2*DOTSIZE to Y for IE 5, not sure why
// Still doesn't work great
function setInitPositions(dots)
{
// initialize dot positions to be on top
// of the bullets in the <ul>
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;
}
// put 0th dot above 1st (it is hidden)
dots[0].X = dots[1].X;
dots[0].Y = dots[1].Y - SEGLEN;
}
// just save mouse position for animate() to use
function MoveHandler(e)
{
Xpos = e.pageX;
Ypos = e.pageY;
return true;
}
// just save mouse position for animate() to use
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() {
// dots[0] follows the mouse,
// though no dot is drawn there
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);
}
// air resisitance/friction
var resist = new vec(-dots[i].dx * RESISTANCE,
-dots[i].dy * RESISTANCE);
// compute new accel, including gravity
var accel = new vec((spring.X + resist.X)/MASS + XGRAVITY,
(spring.Y + resist.Y)/ MASS + YGRAVITY);
// compute new velocity
dots[i].dx += (DELTAT * accel.X);
dots[i].dy += (DELTAT * accel.Y);
// stop dead so it doesn't jitter when nearly still
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;
}
// move to new position
dots[i].X += dots[i].dx;
dots[i].Y += dots[i].dy;
// get size of window
var height, width;
if (isNetscape) {
height = window.innerHeight + window.pageYOffset;
width = window.innerWidth + window.pageXOffset;
} else {
height = document.body.clientHeight + document.body.scrollTop;
width = document.body.clientWidth + document.body.scrollLeft;
}
// bounce off 3 walls (leave ceiling open)
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;
}
// move img to new position
dots[i].obj.left = dots[i].X;
dots[i].obj.top = dots[i].Y;
}
}
// end code hiding -->
</script>
</body>
</html>
<!-- END CODE - Powered javascript code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
فشفشه در
صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.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 documentWidth=documentHeight=randomx=randomy=leftcorner=topcorner=0
var ns=(document.layers);
var ie=(document.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)
document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);
for(dNum=0; dNum<7; ++dNum){
if(ie)
allDivs[dNum]=eval('document.all.sDiv'+dNum+'.style');
else
allDivs[dNum]=eval('document.layers["sDiv'+dNum+'"]');
}
}
function firework(){
//below code detects the browser dimenions
if (ie){
documentWidth=document.body.clientWidth
documentHeight=document.body.clientHeight
leftcorner=document.body.scrollLeft
topcorner=document.body.scrollTop
}
else if (ns){
documentWidth=window.innerWidth
documentHeight=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()*documentWidth)
randomy=topcorner+Math.floor(Math.random()*documentHeight)
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>(document.body.offsetHeight+document.body.scrollTop))
tempy=document.body.offsetHeight+document.body.scrollTop-80;
if(tempx+80>(document.body.offsetWidth+document.body.scrollLeft))
tempx=document.body.offsetWidth+document.body.scrollLeft-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 http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
تقويم در
سايت
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<!-- ONE STEP TO INSTALL MONTHLY: DAY HIGHLIGHTED:
1. Put the code into the BODY of your HTML document -->
<!-- STEP ONE: Copy this code into the HEAD your HTML document -->
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body>
<center>
<script LANGUAGE="JavaScript">
<!-- 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;
document.write("<table border=2 bgcolor=white ");
document.write("bordercolor=black><font color=black>");
document.write("<tr><td colspan=7><center><strong>"
+ monthnames[thismonth] + " " + thisyear
+ "</strong></center></font></td></tr>");
document.write("<tr>");
document.write("<td align=center>Su</td>");
document.write("<td align=center>M</td>");
document.write("<td align=center>Tu</td>");
document.write("<td align=center>W</td>");
document.write("<td align=center>Th</td>");
document.write("<td align=center>F</td>");
document.write("<td align=center>Sa</td>");
document.write("</tr>");
document.write("<tr>");
for (s=0;s<startspaces;s++) {
document.write("<td> </td>");
}
count=1;
while (count <= monthdays[thismonth]) {
for (b = startspaces;b<7;b++) {
linktrue=false;
document.write("<td>");
for (c=0;c<linkdays.length;c++) {
if (linkdays[c] != null) {
if ((linkdays[c][0]==thismonth + 1) && (linkdays[c][1]==count)) {
document.write("<a href=\"" + linkdays[c][2] + "\">");
linktrue=true;
}
}
}
if (count==thisdate) {
document.write("<font color='FF0000'><strong>");
}
if (count <= monthdays[thismonth]) {
document.write(count);
}
else {
document.write(" ");
}
if (count==thisdate) {
document.write("</strong></font>");
}
if (linktrue)
document.write("</a>");
document.write("</td>");
count++;
}
document.write("</tr>");
document.write("<tr>");
startspaces=0;
}
document.write("</table></p>");
// End -->
</script>
</center>
<!-- Script Size: 2.98 KB -->
</body>
</html>
<!-- END CODE - Powered javascript code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
کد
قرار دادن در هم پیج
<!-- this script got from KKR-->
<table>
<TD width="100%"><A class=chlnk
style="CURSOR: hand; font-decoration: underline"
onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://AliErfan84.Blogfa.com');"
href="\">set as your home page
نویسنده : علی مهاجر
کد
پیام در ابتدای ورود کاربر
<html>
<head>
<script language="javascript" type="text/javascript">
alert("Welcome to my site")
</script>
</head>
<body>
<h1>
<!-- hide script from old browsers -->
<!--this is on example of a long JavaScript comment-->
<script language="javascript" type="text/javascript">
document.write("KKR")
//end hiding script from old browsers -->
</script>
</h1>
</body>
</html>
نویسنده : علی مهاجر
کد
جستجو در وبلاگ یا سایت
<SCRIPT language=JavaScript>
var NS4 = (document.layers);
var IE4 = (document.all);
var win = window;
var n = 0;
function findInPage(str) {
var txt, i, found;
if (str == "")
return false;
if (NS4) {
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;
if (n == 0)
alert("Not found.");
}
if (IE4) {
txt = win.document.body.createTextRange();
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
n++;
}
else {
if (n > 0) {
n = 0;
findInPage(str);
}
else
alert("(( ببخشيد... كلمه اي كه نوشتي تو وبلاگ نيست)) ");
}
}
return false;
}
</SCRIPT>
<FORM name=search onsubmit="return findInPage(this.string.value);">
<P align=center><FONT size=3><INPUT
style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid"
onchange="n = 0;" size=11 name=string></FONT><BR><INPUT style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #aaaaaa" type=submit value=جستجو در وبلاگ ><center><font size=2pt;><font family=Times New Roman;><b><A title=persianblog href="http://www.Javascripts.persianblog.com/">Javascripts
</A><BR>
</P></FORM></DIV><BR><!-- /Search-->
نویسنده : علی مهاجر
کد
گل باران در سایت یا وبلاگ
<!-- this script got from http://AliErfan84.Blogfa.com-->
<body bgcolor='#000000' >
<!-- Start of Fireworks -->
<script language="JavaScript">
<!-- IE4+, NS4+, NS6 Fireworks script by kurt.grigg@virgin.net
CL=new Array('#ff0000','#00ff00','#ffffff','#ff00ff','#ffa500','#ffff00','#00ff00','#ffffff','#ff00ff')
CL2=new Array('#ffa500','#00ff00','#FFAAFF','#fff000','#fffffF')
Xpos=130;
Ypos=130;
I='#00ff00';
C=0;
S=5;
H=null;
W=null;
Y=null;
NS4=(document.layers);
NS6=(document.getElementById&&!document.all);
IE4=(document.all);
A=14;
E=120;
L=null;
if (NS4){
for (i=0; i < A; i++)
document.write('<LAYER NAME="nsstars'+i+'" TOP=0 LEFT=0 BGCOLOR='+I+' CLIP="0,0,2,2"></LAYER>');
}
if (NS6){
window.document.body.style.overflow='hidden';
for (i=0; i < A; i++)
document.write('<div id="ns6stars'+i+'" style="position:absolute;top:0px;left:0px;height:2px;width:2px;font-size:2px;background:'+I+'"></div>');
}
if (IE4){
document.write('<div id="ie" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < A; i++)
document.write('<div id="iestars" style="position:absolute;top:0;left:0;width:2px;height:2px;background:'+I+';font-size:2px"></div>');
document.write('</div></div>');
}
function Fireworks(){
H=(NS4||NS6)?window.innerHeight:window.document.body.clientHeight;
W=(NS4||NS6)?window.innerWidth:window.document.body.clientWidth;
Y=(NS4||NS6)?window.pageYOffset:window.document.body.scrollTop;
for (i=0; i < A; i++){
if (IE4)L=iestars[i].style;
if (NS4)L=document.layers["nsstars"+i];
if (NS6)L=document.getElementById("ns6stars"+i).style;
var F = CL[Math.floor(Math.random()*CL.length)];
var RS=Math.round(Math.random()*2);
L.top = Ypos + E*Math.sin((C+i*5)/3)*Math.sin(C/100)
L.left= Xpos + E*Math.cos((C+i*5)/3)*Math.sin(C/100)
if (C < 110){
if (NS4){L.bgColor=I;L.clip.width=1;L.clip.height=1}
if (IE4||document.getElementById)
{L.background=I;L.width=1;L.height=1;L.fontSize=1}
}
else{
if (NS4){L.bgColor=F;L.clip.width=RS;L.clip.height=RS}
if (IE4||document.getElementById){L.background=F;L.width=RS;L.height=RS;L.fontSize=RS}
}
}
if (C > 220){
C=0;
var NC = CL2[Math.floor(Math.random()*CL2.length)];
I=NC;
E=Math.round(100+Math.random()*90);
Ypos = E+Math.round(Math.random()*(H-(E*2.2)))+Y;
Xpos = E+Math.round(Math.random()*(W-(E*2.2)));
}
C+=S;
setTimeout("Fireworks()",10);
}
Fireworks();
// -->
</script>
<!-- End of Fireworks -->
نویسنده : علی مهاجر
كد عكس به دنبال موس
توجه كنيد بايد نام عكس خود را به جاي تي 1 وارد كنيد
<div id="dot0" style="position: absolute; visibility: hidden; height: 11; width: 11;">
<img src="t1.gif" height=11 width=11>
</div>
<div id="dot1" style="position: absolute; height: 11; width: 11;">
<img src="t1.gif" height=11 width=11>
</div>
<div id="dot2" style="position: absolute; height: 11; width: 11;">
<img src="t1.gif" height=11 width=11>
</div>
<div id="dot3" style="position: absolute; height: 11; width: 11;">
<img src="t1.gif" height=11 width=11>
</div>
<div id="dot4" style="position: absolute; height: 11; width: 11;">
<img src="t1.gif" height=11 width=11>
</div>
<div id="dot5" style="position: absolute; height: 11; width: 11;">
<img src="t1.gif" height=11 width=11>
</div>
<div id="dot6" style="position: absolute; height: 11; width: 11;">
<img src="t1.gif" height=11 width=11>
</div>
<script LANGUAGE="JavaScript">
<!-- hide code
var nDots = 7;
var Xpos = 0;
var Ypos = 0;
// fixed time step, no relation to real time
var DELTAT = .01;
// size of one spring in pixels
var SEGLEN = 10;
// spring constant, stiffness of springs
var SPRINGK = 10;
// all the physics is bogus, just picked stuff to
// make it look okay
var MASS = 1;
// Positive XGRAVITY pulls right, negative pulls left
// Positive YGRAVITY pulls down, negative up
var XGRAVITY = 0;
var YGRAVITY = 50;
// RESISTANCE determines a slowing force proportional to velocity
var RESISTANCE = 10;
// stopping criterea to prevent endless jittering
// doesn't work when sitting on bottom since floor
// doesn't push back so acceleration always as big
// as gravity
var STOPVEL = 0.1;
var STOPACC = 0.1;
var DOTSIZE = 11;
// BOUNCE is percent of velocity retained when
// bouncing off a wall
var BOUNCE = 0.75;
var isNetscape = navigator.appName=="Netscape";
// always on for now, could be played with to
// let dots fall to botton, get thrown, etc.
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)
}
// set their positions
for (i = 0; i < nDots; i++) {
dots[i].obj.left = dots[i].X;
dots[i].obj.top = dots[i].Y;
}
if (isNetscape) {
// start right away since they are positioned
// at 0, 0
startanimate();
} else {
// let dots sit there for a few seconds
// since they're hiding on the real bullets
setTimeout("startanimate()", 1000);
}
}
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);
}
// This is to line up the bullets with actual LI tags on the page
// Had to add -DOTSIZE to X and 2*DOTSIZE to Y for IE 5, not sure why
// Still doesn't work great
function setInitPositions(dots)
{
// initialize dot positions to be on top
// of the bullets in the <ul>
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;
}
// put 0th dot above 1st (it is hidden)
dots[0].X = dots[1].X;
dots[0].Y = dots[1].Y - SEGLEN;
}
// just save mouse position for animate() to use
function MoveHandler(e)
{
Xpos = e.pageX;
Ypos = e.pageY;
return true;
}
// just save mouse position for animate() to use
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() {
// dots[0] follows the mouse,
// though no dot is drawn there
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);
}
// air resisitance/friction
var resist = new vec(-dots[i].dx * RESISTANCE,
-dots[i].dy * RESISTANCE);
// compute new accel, including gravity
var accel = new vec((spring.X + resist.X)/MASS + XGRAVITY,
(spring.Y + resist.Y)/ MASS + YGRAVITY);
// compute new velocity
dots[i].dx += (DELTAT * accel.X);
dots[i].dy += (DELTAT * accel.Y);
// stop dead so it doesn't jitter when nearly still
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;
}
// move to new position
dots[i].X += dots[i].dx;
dots[i].Y += dots[i].dy;
// get size of window
var height, width;
if (isNetscape) {
height = window.innerHeight + window.pageYOffset;
width = window.innerWidth + window.pageXOffset;
} else {
height = document.body.clientHeight + document.body.scrollTop;
width = document.body.clientWidth + document.body.scrollLeft;
}
// bounce off 3 walls (leave ceiling open)
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;
}
// move img to new position
dots[i].obj.left = dots[i].X;
dots[i].obj.top = dots[i].Y;
}
}
// end code hiding -->
</script>
نویسنده : علی مهاجر
کد
ستاره باران در پس ضمینه
<FONT face=Tahoma color=white>
<html>
<head>
</head>
<body>
<!-- STEP ONE: Insert the onLoad event handler into your BODY tag -->
<BODY BGCOLOR="#000000" onLoad="fly()">
<!-- STEP TWO: Paste this code into the BODY of your HTML document -->
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
SmallStars = 30;
LargeStars = 10;
SmallYpos = new Array();
SmallXpos = new Array();
LargeYpos = new Array();
LargeXpos = new Array();
Smallspeed= new Array();
Largespeed= new Array();
ns=(document.layers)?1:0;
if (ns) {
for (i = 0; i < SmallStars; i++) {
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,1,1'></LAYER>");
}
for (i = 0; i < LargeStars; i++) {
document.write("<LAYER NAME='ln"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFFF' CLIP='0,0,2,2'></LAYER>");
}
}
else {
document.write('<div style="position:absolute;top:0px;left:0px">');
document.write('<div style="position:relative">');
for (i = 0; i < SmallStars; i++) {
document.write('<div id="si" style="position:absolute;top:0;left:0;width:1px;height:1px;background:#fffff0;font-size:1px"></div>');
}
document.write('</div>');
document.write('</div>');
document.write('<div style="position:absolute;top:0px;left:0px">');
document.write('<div style="position:relative">');
for (i = 0; i < LargeStars; i++) {
document.write('<div id="li" style="position:absolute;top:0;left:0;width:2px;height:2px;background:#ffffff;font-size:2px"></div>');
}
document.write('</div>');
document.write('</div>');
}
WinHeight = (document.layers)?window.innerHeight:window.document.body.clientHeight;
WinWidth = (document.layers)?window.innerWidth:window.document.body.clientWidth;
for (i = 0; i < SmallStars; i++) {
SmallYpos[i] = Math.round(Math.random() * WinHeight);
SmallXpos[i] = Math.round(Math.random() * WinWidth);
Smallspeed[i]= Math.random() * 5 + 1;
}
for (i = 0; i < LargeStars; i++) {
LargeYpos[i] = Math.round(Math.random() * WinHeight);
LargeXpos[i] = Math.round(Math.random() * WinWidth);
Largespeed[i] = Math.random() * 10 + 5;
}
function fly() {
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 < LargeStars; i++) {
LargeXpos[i] -= Largespeed[i];
if (LargeXpos[i] < -10) {
LargeXpos[i] = WinWidth;
LargeYpos[i] = Math.round(Math.random() * WinHeight);
Largespeed[i] = Math.random() * 10 + 5;
}
if (ns) {
document.layers['ln'+i].left = LargeXpos[i];
document.layers['ln'+i].top = LargeYpos[i] + hscrll;
}
else {
li[i].style.pixelLeft = LargeXpos[i];
li[i].style.pixelTop = LargeYpos[i] + hscrll;
}
}
for (i = 0; i < SmallStars; i++) {
SmallXpos[i] -= Smallspeed[i];
if (SmallXpos[i] < -10) {
SmallXpos[i] = WinWidth;
SmallYpos[i] = Math.round(Math.random()*WinHeight);
Smallspeed[i] = Math.random() * 5 + 1;
}
if (ns) {
document.layers['sn'+i].left = SmallXpos[i];
document.layers['sn'+i].top = SmallYpos[i]+hscrll;
}
else {
si[i].style.pixelLeft = SmallXpos[i];
si[i].style.pixelTop = SmallYpos[i]+hscrll;
}
}
setTimeout('fly()', 10);
}
// End -->
</script>
<!-- Script Size: 3.79 KB -->
</body>
</html>
نویسنده : علی مهاجر
کد
تغییر تیتر جستجو گر به صورت متحرک
<SCRIPT language=javascript>
msg = "I am the best programmer in the world";
msg = "..." + msg;pos = 0;
function scrollMSG() {
document.title = msg.substring(pos, msg.length) + msg.substring(0, pos);
pos++;
if (pos > msg.length) pos = 0
window.setTimeout("scrollMSG()",200);
}
scrollMSG();
</SCRIPT>
نویسنده : علی مهاجر
کد برگهای
پاییزی در سایت یا وبلاگ
<script language="JavaScript1.2">
//Pre-load your image below!
grphcs=new Array(6)
Image0=new Image();
Image0.src=grphcs[0]="http://home.ripway.com/2004-5/117697/1.gif";
Image1=new Image();
Image1.src=grphcs[1]="http://home.ripway.com/2004-5/117697/2.gif"
Image2=new Image();
Image2.src=grphcs[2]="http://home.ripway.com/2004-5/117697/3.gif"
Image3=new Image();
Image3.src=grphcs[3]="http://home.ripway.com/2004-5/117697/4.gif"
Image4=new Image();
Image4.src=grphcs[4]="http://home.ripway.com/2004-5/117697/5.gif"
Image5=new Image();
Image5.src=grphcs[5]="http://home.ripway.com/2004-5/117697/6.gif"
Amount=8; //Smoothness depends on image file size, the smaller the size the more you can use!
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
ns6=(document.getElementById&&!document.all)?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'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(ns||ns6)?window.innerWidth-70: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()*5+3;
Cstep[i]=0;
Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
var wscrll=(ns||ns6)?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+3;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else if (ns6){
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]);
document.getElementById("si"+i).style.top=Ypos[i]+hscrll;
}
else{
eval("document.all.si"+i).style.left=Xpos[i];
eval("document.all.si"+i).style.top=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',20);
}
window.onload=fall
//-->
</script>
نویسنده : علی مهاجر
کد
جستجوی گوگل در سایت یا وبلاگ
<!-- Search Google -->
<center>
<FORM method=GET action="http://www.google.com/search">
<TABLE bgcolor="#FFFFFF"><tr><td>
<A HREF="http://www.google.com/">
<IMG SRC="http://www.google.com/logos/Logo_40wht.gif" <br>border="0" ALT="Google" align="absmiddle"></A>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT TYPE=hidden name=hl value="en">
<INPUT type=submit name=btnG VALUE="Google Search">
</td></tr></TABLE>
</FORM>
</center>
<!-- Search Google -->
نویسنده : علی مهاجر
کد
جستجوگر ام اس ان در سایت یا وبلاگ
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
</head>
<body>
<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>
</body>
</html>
نویسنده : علی مهاجر
کد
خروج از جستجو گر
<!-- Start of Close Browser Script -->
<!-- When the "Close Window" button is clicked, this script
will close the browser window that the webpage is in.
-->
<script language="JavaScript">
<!--
function closeIt() {
close();
}
// -->
</script>
<center>
<form>
<input type=button value="Close Window" onClick="closeIt()">
</form>
</center>
<!-- End of Close Browser Script -->
نویسنده : علی مهاجر
کد
رقص متن در استاتوس بار
<!-- DESCRIPTION: This script will make your status message slide into place. Neat effect.
INSTRUCTIONS: Place this script in the BODY tags of
your webpage. Then place the appropriate message in the var msg value.
FUNCTIONALITY: Works in both Netscape and IE.
//Modified by CoffeeCup Software
//This code is Copyright (c) 1997 CoffeeCup Software
//all rights reserved. License is granted to a single user to
//reuse this code on a personal or business Web Site.
-->
<BODY onLoad="timerONE=window.setTimeout('slide(120,0)',20);">
<SCRIPT LANGUAGE="JavaScript">
function slide(jumpSpaces,position) {
var msg = "This JavaScript will slide in your desired message....Cool...isn't it???.......drink more coffee"
var out = ""
if (endScroll) {return false}
for (var i=0; i<position; i++)
{out += msg.charAt(i)}
for (i=1;i<jumpSpaces;i++)
{out += " "}
out += msg.charAt(position)
window.status = out
if (jumpSpaces <= 1) {
position++
if (msg.charAt(position) == ' ')
{position++ }
jumpSpaces = 100-position
} else if (jumpSpaces > 3)
{jumpSpaces *= .75}
else
{jumpSpaces--}
if (position != msg.length) {
var cmd = "slide(" + jumpSpaces + "," + position + ")";
scrollID = window.setTimeout(cmd,5);
} else {
scrolling = false
return false
}
return true
}
function ccSetup() {
if (scrolling)
if (!confirm('Re-initialize slide?'))
return false
endScroll = true
scrolling = true
var killID = window.setTimeout('endScroll=false',6)
scrollID = window.setTimeout('slide(100,0)',10)
return true
}
var scrollID = Object
var scrolling = false
var endScroll = false
</SCRIPT>
نویسنده : علی مهاجر
کد
یک منوی جالب برای خارجی
<!-- START OF Watermark Navigation Menu DHTML --><!-- START OF Watermark Navigation Menu DHTML -->
<!-- SUMMARY BRIEF
This DHTML script will make a navigation menu
that will follow your screen as you scroll,
kind of like the old Geocities™ watermark.
Look through the code for comments that will
tell you where to change the code to configure
it how you want in order to display the links
that you want.
-->
<!-- Put this code inside of your <HEAD> tag. -->
<STYLE TYPE="text/css">
<!--
.menuheader {
BORDER-COLOR : #000000 ;
cursor : hand ;
Border-Left : #000000 ;
Border-Top : #000000 ;
Padding-Left : 1px ;
Padding-Top : 1px ;
Background-Color : #000000 ;
}
.menu {
Background-Color : white ;
}
.home {
cursor : hand ;
}
.menulinks {
text-decoration:none;
}
//-->
</STYLE>
<!-- Put this code inside of your <BODY> tag on your page, but OUTSIDE of any other tags. This can NOT be inside of any other tags on your page. -->
<SCRIPT Language="Javascript1.2">
<!--
///////////////////////////////////////////////////////////////
// Change the width and placement of the menu on the page below.
///////////////////////////////////////////////////////////////
var menuwidth=110
var offsetleft=10
var offsettop=10
var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
function makeStatic() {
if (ie4) {object1.style.pixelTop=document.body.scrollTop+offsettop}
else if (ns6) {document.getElementById("object1").style.top=window.pageYOffset+offsettop}
else if (ns4) {eval(document.object1.top=eval(window.pageYOffset+offsettop));}
setTimeout("makeStatic()",0);
}
if (ie4||ns6) {document.write('<span ALIGN="CENTER" ID="object1" STYLE="Position:absolute; Top:20; Left:'+offsetleft+'; Z-Index:5;cursor:hand;background-color:black;"><TABLE BORDER="1" width="'+menuwidth+'" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="black" bgcolor="white">')}
else if (ns4){ document.write('<LAYER top="20" name="object1" left="'+offsetleft+'" BGCOLOR=black><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1"><TR><TD><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="'+menuwidth+'">')}
///////////////////////////////////////////////////////////////
// Change the name of the menu (the text at the top) below.
// You can also shange the font face, size and border colors.
///////////////////////////////////////////////////////////////
if (ie4||ns6||ns4)
document.write('<TR><TD BGCOLOR="#3399FF" BORDERCOLORDARK="#99CCFF" BORDERCOLORLIGHT="#003399"><P ALIGN=CENTER><FONT SIZE="4" FACE=ARIAL>Navigation</FONT></TD></TR>')
var menui = new Array();
var menul = new Array();
///////////////////////////////////////////////////////////////
// Edit menus listing here. You can make as many as you need,
// just make sure that the numbers go up in order correctly.
// The "menui" variables are the actual link text that will
// show up in the menu. The "menul" variables are the URLs
// that match the text displayed there.
///////////////////////////////////////////////////////////////
menui[0]="CoffeeCup Software";
menui[1]="CoffeeCup HTML Editor";
menui[2]="CoffeeCup Help Site";
menui[3]="CoffeeCup Site Map";
menui[4]="Other CoffeeCup Products";
menui[5]="Bob & Larry\'s Free Stuff";
menui[6]="About CoffeeCup Software";
menui[7]="Bluedomino Webhosting";
menul[0]="http://www.webloger.5u.com";
menul[1]="http://www.webloger.5u.com";
menul[2]="http://www.webloger.5u.com";
menul[3]="http://www.webloger.5u.com";
menul[4]="http://www.webloger.5u.com";
menul[5]="http://www.webloger.5u.com";
menul[6]="http://www.webloger.5u.com";
menul[7]="http://www.webloger.5u.com";
for (i=0;i<=menui.length-1;i++)
///////////////////////////////////////////////////////////////
// You can change table cell background colors below.
// Just change the color names to whatever you want,
// but do NOT change any other code.
///////////////////////////////////////////////////////////////
if (ie4||ns6) {document.write('<TR><TD BORDERCOLOR="white" ONCLICK="location=\''+menul[i]+'\'" onmouseover="className=\'menuheader\'" onMouseout="className=\'menu\'"><CENTER><FONT>'+menui[i]+'</FONT></TD></TR>')}
else if (ns4){document.write('<TR><TD BGCOLOR="white"><ILAYER><LAYER width="'+menuwidth+'" onmouseover="bgColor=\'yellow\'" onmouseout="bgColor=\'white\'"><CENTER><A HREF="'+menul[i]+'" class=menulinks>'+menui[i]+'</A></CENTER></LAYER></ILAYER></TD></TR>')}
if (ie4||ns6) {document.write('</TABLE></span>')}
else if (ns4){document.write('</TABLE></TD></TR></TABLE></LAYER>')}
function menu3(){
if (ns6||ie4||ns4)
makeStatic()
}
window.onload=menu3
//-->
</SCRIPT>
<!-- END OF Watermark Navigation Menu DHTML -->
<!-- SUMMARY BRIEF
This DHTML script will make a navigation menu
that will follow your screen as you scroll,
kind of like the old Geocities™ watermark.
Look through the code for comments that will
tell you where to change the code to configure
it how you want in order to display the links
that you want.
-->
<!-- Put this code inside of your <HEAD> tag. -->
<STYLE TYPE="text/css">
<!--
.menuheader {
BORDER-COLOR : #000000 ;
cursor : hand ;
Border-Left : #000000 ;
Border-Top : #000000 ;
Padding-Left : 1px ;
Padding-Top : 1px ;
Background-Color : #000000 ;
}
.menu {
Background-Color : white ;
}
.home {
cursor : hand ;
}
.menulinks {
text-decoration:none;
}
//-->
</STYLE>
<!-- Put this code inside of your <BODY> tag on your page, but OUTSIDE of any other tags. This can NOT be inside of any other tags on your page. -->
<SCRIPT Language="Javascript1.2">
<!--
///////////////////////////////////////////////////////////////
// Change the width and placement of the menu on the page below.
///////////////////////////////////////////////////////////////
var menuwidth=110
var offsetleft=10
var offsettop=10
var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
function makeStatic() {
if (ie4) {object1.style.pixelTop=document.body.scrollTop+offsettop}
else if (ns6) {document.getElementById("object1").style.top=window.pageYOffset+offsettop}
else if (ns4) {eval(document.object1.top=eval(window.pageYOffset+offsettop));}
setTimeout("makeStatic()",0);
}
if (ie4||ns6) {document.write('<span ALIGN="CENTER" ID="object1" STYLE="Position:absolute; Top:20; Left:'+offsetleft+'; Z-Index:5;cursor:hand;background-color:black;"><TABLE BORDER="1" width="'+menuwidth+'" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="black" bgcolor="white">')}
else if (ns4){ document.write('<LAYER top="20" name="object1" left="'+offsetleft+'" BGCOLOR=black><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1"><TR><TD><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="'+menuwidth+'">')}
///////////////////////////////////////////////////////////////
// Change the name of the menu (the text at the top) below.
// You can also shange the font face, size and border colors.
///////////////////////////////////////////////////////////////
if (ie4||ns6||ns4)
document.write('<TR><TD BGCOLOR="#3399FF" BORDERCOLORDARK="#99CCFF" BORDERCOLORLIGHT="#003399"><P ALIGN=CENTER><FONT SIZE="4" FACE=ARIAL>Navigation</FONT></TD></TR>')
var menui = new Array();
var menul = new Array();
///////////////////////////////////////////////////////////////
// Edit menus listing here. You can make as many as you need,
// just make sure that the numbers go up in order correctly.
// The "menui" variables are the actual link text that will
// show up in the menu. The "menul" variables are the URLs
// that match the text displayed there.
///////////////////////////////////////////////////////////////
menui[0]="CoffeeCup Software";
menui[1]="CoffeeCup HTML Editor";
menui[2]="CoffeeCup Help Site";
menui[3]="CoffeeCup Site Map";
menui[4]="Other CoffeeCup Products";
menui[5]="Bob & Larry\'s Free Stuff";
menui[6]="About CoffeeCup Software";
menui[7]="Bluedomino Webhosting";
menul[0]="http://www.javakhafan.9f.com";
menul[1]="http://www.javakhafan.9f.com";
menul[2]="http://www.javakhafan.9f.com";
menul[3]="http://www.javakhafan.9f.com";
menul[4]="http://www.javakhafan.9f.com";
menul[5]="http://www.javakhafan.9f.com";
menul[6]="http://www.javakhafan.9f.com";
menul[7]="http://www.javakhafan.9f.com";
for (i=0;i<=menui.length-1;i++)
///////////////////////////////////////////////////////////////
// You can change table cell background colors below.
// Just change the color names to whatever you want,
// but do NOT change any other code.
///////////////////////////////////////////////////////////////
if (ie4||ns6) {document.write('<TR><TD BORDERCOLOR="white" ONCLICK="location=\''+menul[i]+'\'" onmouseover="className=\'menuheader\'" onMouseout="className=\'menu\'"><CENTER><FONT>'+menui[i]+'</FONT></TD></TR>')}
else if (ns4){document.write('<TR><TD BGCOLOR="white"><ILAYER><LAYER width="'+menuwidth+'" onmouseover="bgColor=\'yellow\'" onmouseout="bgColor=\'white\'"><CENTER><A HREF="'+menul[i]+'" class=menulinks>'+menui[i]+'</A></CENTER></LAYER></ILAYER></TD></TR>')}
if (ie4||ns6) {document.write('</TABLE></span>')}
else if (ns4){document.write('</TABLE></TD></TR></TABLE></LAYER>')}
function menu3(){
if (ns6||ie4||ns4)
makeStatic()
}
window.onload=menu3
//-->
</SCRIPT>
<!-- END OF Watermark Navigation Menu DHTML -->
نویسنده : علی مهاجر
کد رفتن
به بالای صفحه
<!-- START OF Watermark Jump to Top Link DHTML -->
<!-- SUMMARY BRIEF
This DHTML script will put a small watermark
link in the bottom right corner of your page
that will stay there even when the page scrolls.
This link will always take the user back to
the top of the page.
-->
<!-- Put this portion of the script inside of your <HEAD> tag -->
<script>
<!--
// Change this text to the text that you want to be displayed as the link on your page.
var displayed="<nobr><font size=2 face=Arial><b>[Top]</b></font></nobr>"
// === DO NOT EDIT ANYTHING BELOW THIS LINE!!! === //
var logolink='javascript:window.scrollTo(0,0)'
var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (ns4)
setTimeout("window.onresize=regenerate",400)
}
if (ie4||ns6)
document.write('<span id="logo" style="position:absolute;top:-300;z-index:100">'+displayed+'</span>')
function createtext(){ //function for NS4
staticimage=new Layer(5)
staticimage.left=-300
staticimage.document.write('<a href="'+logolink+'">'+displayed+'</a>')
staticimage.document.close()
staticimage.visibility="show"
regenerate2()
staticitns()
}
function staticit(){ //function for IE4/ NS6
var w2=ns6? pageXOffset+w : document.body.scrollLeft+w
var h2=ns6? pageYOffset+h : document.body.scrollTop+h
crosslogo.style.left=w2
crosslogo.style.top=h2
}
function staticit2(){ //function for NS4
staticimage.left=pageXOffset+window.innerWidth-staticimage.document.width-28
staticimage.top=pageYOffset+window.innerHeight-staticimage.document.height-10
}
function inserttext(){ //function for IE4/ NS6
if (ie4)
crosslogo=document.all.logo
else if (ns6)
crosslogo=document.getElementById("logo")
crosslogo.innerHTML='<a href="'+logolink+'">'+displayed+'</a>'
w=ns6? window.innerWidth-crosslogo.offsetWidth-20 : document.body.clientWidth-crosslogo.offsetWidth-10
h=ns6? window.innerHeight-crosslogo.offsetHeight-15 : document.body.clientHeight-crosslogo.offsetHeight-10
crosslogo.style.left=w
crosslogo.style.top=h
if (ie4)
window.onscroll=staticit
else if (ns6)
startstatic=setInterval("staticit()",100)
}
if (ie4||ns6){
window.onload=inserttext
window.onresize=new Function("window.location.reload()")
}
else if (ns4)
window.onload=createtext
function staticitns(){ //function for NS4
startstatic=setInterval("staticit2()",90)
}
//-->
</script>
<!-- END OF Watermark Jump to Top Link DHTML -->
نویسنده : علی مهاجر
کد حرکت
جستجوگر به صورت بسیار جالب
<!-- Start of Browser Shake JavaScript -->
<!-- This script causes your entire browser window to shake. ::rumble:: -->
<!-- Instructions: Just put the beginning of this code inside your pages
'<head>' tags and the later part inside your pages '<body>' tags. -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<script>
function drop(n) {
if(self.moveBy){
self.moveBy (0,-900);
for(i = n; i > 0; i--){
self.moveBy(0,3);
}
for(j = 8; j > 0; j--){
self.moveBy(0,j);
self.moveBy(j,0);
self.moveBy(0,-j);
self.moveBy(-j,0);
}
}
}
</script>
<SCRIPT language="JavaScript">
<!--
var TrackRed= 0x00; //(RED) Replace the values after '0x' with the
var TrackGreen= 0x00; //(GREEN) two-letter/number hexadecimal color codes
var TrackBlue= 0x00; //(BLUE) in the BODY tag (after bgcolor=).
function FadeTo(steps,red,green,blue)
{
for (var i = 0; i <= steps; i++)
{
var endpart = i/steps;
var startpart = 1 - endpart;
document.bgColor =
Math.floor(TrackRed * startpart + red * endpart)*256*256 +
Math.floor(TrackGreen * startpart + green * endpart)*256 +
Math.floor(TrackBlue * startpart + blue * endpart);
}
TrackRed=red; TrackGreen=green; TrackBlue=blue;
}
//-->
</SCRIPT>
<STYLE TYPE="text/css">
<!--
A {text-decoration:none;}
A:hover {color:silver;}
//-->
</STYLE>
</head>
<body bgcolor="black" text="silver" link="silver"
vlink="silver" alink="silver" onload="drop(300); FadeTo(50,0xFF,0xFF,0xFF);">
<p align="center"><b><font face="Tahoma" size="2">Created By
<a href="http://www.webloger.5u.com/">Webloger.5u.com</a></font></b></p>
</body>
</html>
<!-- End of Browser Shake JavaScript -->
نویسنده : علی مهاجر
کد
تغییر رنگ پس زمینه
<!-- Start of Change BackGround Color-->
<!-- DESCRIPTION: This will allow the user to change the background color of your page. Neat trick.
INSTRUCTIONS: Place this script anywhere in the <BODY> tag.
FUNCTIONALITY: Works in both Netscape and IE.
-->
<!--
//Modified by CoffeeCup Software
//This code is Copyright (c) 1998 CoffeeCup Software
//All rights reserved. License is granted to a single user to
//reuse this code on a personal or business Web Site.
// -->
<CENTER>
<FORM>
<FONT FACE="VERDANA, ARIAL"><B>Choose a background color:</B></FONT>
<SELECT name="ccGround" size="1" onChange=(document.bgColor=ccGround.options[ccGround.selectedIndex].value)>
<OPTION value="408080" target="1" selected>Cool Green
<OPTION value="C0C0C0" target="1">Cool Grey
<OPTION value="000000" target="1">Black
<OPTION value="730200" target="1">DarkRed
<OPTION value="231800" target="1">Brown
<OPTION value="044302" target="1">DarkGreen
<OPTION value="0D09A3" target="1">Dark Blue
<OPTION value="808040" target="1">Avocado
<OPTION value="800080" target="1">Purple
<OPTION value="444444" target="1">Gray
<OPTION value="FF0400" target="1">Red
<OPTION value="EFE800" target="1">Yellow
<OPTION value="05EF00" target="1">Green
<OPTION value="0206FF" target="1">Blue
<OPTION value="AE08EF" target="1">Violet
<OPTION value="FF8C8A" target="1">Mauve
<OPTION value="FF80FF" target="1">Pink
<OPTION value="FFCCCC" target="1">Peach
<OPTION value="FFCC99" target="1">Orange
<OPTION value="000080" target="1">Darker Blue
<OPTION value="808080" target="1">Dark Grey
<OPTION value="D5CCBB" target="1">Tan
<OPTION value="DDDDDD" target="1">LightGray
<OPTION value="FBFF73" target="1">Light Yellow
<OPTION value="7CFF7D" target="1">LightGreen
<OPTION value="A6BEFF" target="1">Light Blue
<OPTION value="FFFFFF" target="1">White
</SELECT></FORM></CENTER>
<!-- Start of Change BackGround Color-->
نویسنده : علی مهاجر
کد
قراردادن دکمه عقب و جلو
<!-- Start of Back/Forward Buttons Script-->
<!-- Instructions: Just put this script anywhere on your webpage
and you will give your visitor 2 Back and Forward Navigation
buttons. Designed for websites that have multiple webpages.
-->
<SCRIPT LANGUAGE="JavaScript">
<!-- hide this script tag's contents from old browsers
function goHist(a)
{
history.go(a); // Go back one.
}
//<!-- done hiding from old browsers -->
</script>
<FORM METHOD="post">
<INPUT TYPE="button" VALUE=" BACK " onClick="goHist(-1)">
<INPUT TYPE="button" VALUE="FORWARD" onClick="goHist(1)">
</form>
<!-- End of Back/Forward Buttons Script -->
نویسنده : علی مهاجر
کد دکمه
ای برای پرینت از صفحه
<!-- Print Page Script
Use this script to have your
users print your HTML page
-->
<SCRIPT LANGUAGE="JavaScript">
if (window.print) {
document.write('<form> '
+ '<input type=button name=print value="Click" '
+ 'onClick="javascript:window.print()"> To Print this page!</form>');
}
// End -->
</script>
نویسنده : علی مهاجر
کدقرار
دادن ماشین حساب
<!-- Start of CoffeeCup Calculator Script -->
<!-- A Simple Calculator -->
<!-- Instructions: Just put this script anywhere on your webpage
between the body tags and you will have a calculator for your visitors! -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<CENTER>
<FORM name="Keypad" action="">
<TABLE>
<B>
<TABLE border=2 width=50 height=60 cellpadding=1 cellspacing=5>
<TR>
<TD colspan=3 align=middle>
<input name="ReadOut" type="Text" size=24 value="0" width=100%>
</TD>
<TD
</TD>
<TD>
<input name="btnClear" type="Button" value=" C " onclick="Clear()">
</TD>
<TD><input name="btnClearEntry" type="Button" value=" CE " onclick="ClearEntry()">
</TD>
</TR>
<TR>
<TD>
<input name="btnSeven" type="Button" value=" 7 " onclick="NumPressed(7)">
</TD>
<TD>
<input name="btnEight" type="Button" value=" 8 " onclick="NumPressed(8)">
</TD>
<TD>
<input name="btnNine" type="Button" value=" 9 " onclick="NumPressed(9)">
</TD>
<TD>
</TD>
<TD>
<input name="btnNeg" type="Button" value=" +/- " onclick="Neg()">
</TD>
<TD>
<input name="btnPercent" type="Button" value=" % " onclick="Percent()">
</TD>
</TR>
<TR>
<TD>
<input name="btnFour" type="Button" value=" 4 " onclick="NumPressed(4)">
</TD>
<TD>
<input name="btnFive" type="Button" value=" 5 " onclick="NumPressed(5)">
</TD>
<TD>
<input name="btnSix" type="Button" value=" 6 " onclick="NumPressed(6)">
</TD>
<TD>
</TD>
<TD align=middle><input name="btnPlus" type="Button" value=" + " onclick="Operation('+')">
</TD>
<TD align=middle><input name="btnMinus" type="Button" value=" - " onclick="Operation('-')">
</TD>
</TR>
<TR>
<TD>
<input name="btnOne" type="Button" value=" 1 " onclick="NumPressed(1)">
</TD>
<TD>
<input name="btnTwo" type="Button" value=" 2 " onclick="NumPressed(2)">
</TD>
<TD>
<input name="btnThree" type="Button" value=" 3 " onclick="NumPressed(3)">
</TD>
<TD>
</TD>
<TD align=middle><input name="btnMultiply" type="Button" value=" * " onclick="Operation('*')">
</TD>
<TD align=middle><input name="btnDivide" type="Button" value=" / " onclick="Operation('/')">
</TD>
</TR>
<TR>
<TD>
<input name="btnZero" type="Button" value=" 0 " onclick="NumPressed(0)">
</TD>
<TD>
<input name="btnDecimal" type="Button" value=" . " onclick="Decimal()">
</TD>
<TD colspan=3>
</TD>
<TD>
<input name="btnEquals" type="Button" value=" = " onclick="Operation('=')">
</TD>
</TR>
</TABLE>
</TABLE>
</B>
</FORM>
</CENTER>
<font face="Verdana, Arial, Helvetica" size=2>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var FKeyPad = document.Keypad;
var Accumulate = 0;
var FlagNewNum = false;
var PendingOp = "";
function NumPressed (Num) {
if (FlagNewNum) {
FKeyPad.ReadOut.value = Num;
FlagNewNum = false;
}
else {
if (FKeyPad.ReadOut.value == "0")
FKeyPad.ReadOut.value = Num;
else
FKeyPad.ReadOut.value += Num;
}
}
function Operation (Op) {
var Readout = FKeyPad.ReadOut.value;
if (FlagNewNum && PendingOp != "=");
else
{
FlagNewNum = true;
if ( '+' == PendingOp )
Accumulate += parseFloat(Readout);
else if ( '-' == PendingOp )
Accumulate -= parseFloat(Readout);
else if ( '/' == PendingOp )
Accumulate /= parseFloat(Readout);
else if ( '*' == PendingOp )
Accumulate *= parseFloat(Readout);
else
Accumulate = parseFloat(Readout);
FKeyPad.ReadOut.value = Accumulate;
PendingOp = Op;
}
}
function Decimal () {
var curReadOut = FKeyPad.ReadOut.value;
if (FlagNewNum) {
curReadOut = "0.";
FlagNewNum = false;
}
else
{
if (curReadOut.indexOf(".") == -1)
curReadOut += ".";
}
FKeyPad.ReadOut.value = curReadOut;
}
function ClearEntry () {
FKeyPad.ReadOut.value = "0";
FlagNewNum = true;
}
function Clear () {
Accumulate = 0;
PendingOp = "";
ClearEntry();
}
function Neg () {
FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1;
}
function Percent () {
FKeyPad.ReadOut.value = (parseFloat(FKeyPad.ReadOut.value) / 100) * parseFloat(Accumulate);
}
// End -->
</SCRIPT>
نویسنده : علی مهاجر
کد
ساعت در وبلاگ یا سایت
<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."
document.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" BGCOLOR="000080"
TEXT="ffffff">
<CENTER><form name="clock" onSubmit="0">
<input type="text" name="face" size=13 value=""></CENTER>
نویسنده : علی مهاجر
کد
رنگ به صورت تصادفی
<script>
// Select fade-effect below:
// Set 1 if the background may fade from dark to medium
// Set 2 if the background may fade from light to medium
// Set 3 if the background may fade from very dark to very light light
// Set 4 if the background may fade from light to very light
// Set 5 if the background may fade from dark to very dark
var fade_effect=3
// What type of gradient should be applied Internet Explorer 5x or higher?
// Set "none" or "horizontal" or "vertical"
var gradient_effect="horizontal"
// Speed higher=slower
var speed=60
///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////
var browserinfos=navigator.userAgent
var ie4=document.all&&!document.getElementById
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie4||ie5||ns4||ns6||opera
if (fade_effect==1) {
var darkmax=1
var lightmax=127
}
if (fade_effect==2) {
var darkmax=127
var lightmax=254
}
if (fade_effect==3) {
var darkmax=1
var lightmax=254
}
if (fade_effect==4) {
var darkmax=190
var lightmax=254
}
if (fade_effect==5) {
var darkmax=1
var lightmax=80
}
var hexc = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F')
var newred
var newgreen
var newblue
var oldred
var oldgreen
var oldblue
var redcol_1
var redcol_2
var greencol_1
var greencol_2
var bluecol_1
var bluecol_2
var oldcolor
var newcolor
var firsttime=true
var stepred=1
var stepgreen=1
var stepblue=1
function setrandomcolor() {
var range=(lightmax-darkmax)
if (firsttime) {
newred=Math.ceil(range*Math.random())+darkmax
newgreen=Math.ceil(range*Math.random())+darkmax
newblue=Math.ceil(range*Math.random())+darkmax
firsttime=false
}
oldred=Math.ceil(range*Math.random())+darkmax
oldgreen=Math.ceil(range*Math.random())+darkmax
oldblue=Math.ceil(range*Math.random())+darkmax
stepred=newred-oldred
if (oldred>newred) {stepred=1}
else if (oldred<newred) {stepred=-1}
else {stepred=0}
stepgreen=newgreen-oldgreen
if (oldgreen>newgreen) {stepgreen=1}
else if (oldgreen<newgreen) {stepgreen=-1}
else {stepgreen=0}
stepblue=newblue-oldblue
if (oldblue>newblue) {stepblue=1}
else if (oldblue<newblue) {stepblue=-1}
else {stepblue=0}
fadebg()
}
function fadebg() {
if (newred==oldred) {stepred=0}
if (newgreen==oldgreen) {stepgreen=0}
if (newblue==oldblue) {stepblue=0}
newred+=stepred
newgreen+=stepgreen
newblue+=stepblue
if (stepred!=0 || stepgreen!=0 || stepblue!=0) {
redcol_1 = hexc[Math.floor(newred/16)];
redcol_2 = hexc[newred%16];
greencol_1 = hexc[Math.floor(newgreen/16)];
greencol_2 = hexc[newgreen%16];
bluecol_1 = hexc[Math.floor(newblue/16)];
bluecol_2 = hexc[newblue%16];
newcolor="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2
if (ie5 && gradient_effect!="none") {
if (gradient_effect=="horizontal") {gradient_effect=1}
if (gradient_effect=="vertical") {gradient_effect=0}
greencol_1 = hexc[Math.floor(newred/16)];
greencol_2 = hexc[newred%16];
bluecol_1 = hexc[Math.floor(newgreen/16)];
bluecol_2 = hexc[newgreen%16];
redcol_1 = hexc[Math.floor(newblue/16)];
redcol_2 = hexc[newblue%16];
var newcolorCompl="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2
document.body.style.filter=
"progid:DXImageTransform.Microsoft.Gradient(startColorstr="+newcolorCompl+", endColorstr="+newcolor+" GradientType="+gradient_effect+")"
}
else {
document.bgColor=newcolor
}
var timer=setTimeout("fadebg()",speed);
}
else {
clearTimeout(timer)
newred=oldred
newgreen=oldgreen
newblue=oldblue
oldcolor=newcolor
setrandomcolor()
}
}
if (browserok) {
window.onload=setrandomcolor
}
</script>
نویسنده : علی مهاجر
کد افکت
متن شماره ی یک
<HTML><HEAD>
<meta http-equiv="Content-Language" content="en-us">
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="Microsoft FrontPage 5.0" name=GENERATOR></HEAD>
<BODY>
<DIV id=Zittertext
style="FONT-WEIGHT: bold; FONT-SIZE: 25pt; FILTER: Wave(freq=5, light=0, phase=8, strength=1); WIDTH: 100%; COLOR: orange">
<p align="center"><font color="#000000">
<span style="background-color: #FFFF00">www.javacity.co.sr</span></font></DIV>
<SCRIPT language=JavaScript>
<!--
function DynWave()
{
if(document.all.Zittertext.filters[0].freq > 130)
document.all.Zittertext.filters[0].freq = 15;
document.all.Zittertext.filters[0].freq += 1;
if(document.all.Zittertext.filters[0].phase > 50)
document.all.Zittertext.filters[0].phase = 1;
document.all.Zittertext.filters[0].phase += 1;
if(document.all.Zittertext.filters[0].strength > 1)
document.all.Zittertext.filters[0].strength = .1;
document.all.Zittertext.filters[0].strength += 1;
window.setTimeout("DynWave()",100);
}
DynWave();
// -->
</SCRIPT>
</BODY></HTML>
نویسنده : علی مهاجر
كد افكت متن شماره ي 2
<HTML><HEAD>
<meta http-equiv="Content-Language" content="en-us">
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="Microsoft FrontPage 5.0" name=GENERATOR></HEAD>
<BODY><SPAN id=pochenderText style="WIDTH: 100%">
<H1 align="center"><font color="#FF0000">www.javacity.co.sr</font></H1></SPAN>
<SCRIPT>
<!--
// (C) 2002 Christian Heidler [ All rights reserved ].
// e-mail: privat@christianheidler.de
var from = 4; // minimalgr??e(pochen)
var to = 12; // maximalgr??e(pochen)
var speed = 1; // Geschwindigkeit (je kleiner der Wert, umso schneller pocht es)
var textcolor = "#aabbdd"; // Farbe ausw?hlen (hexadezimalen code od. Html-Farbname)
var i = to;
var j = 0;
pd();
function pu()
{
if (!document.all)
return
if (i < to)
{
pochenderText.style.filter = "Glow(Color=" + textcolor + ", Strength=" + i + ")";
i++;
theTimeout = setTimeout('pu()',speed);
return 0;
}
if (i = to)
{
theTimeout = setTimeout('pd()',speed);
return 0;
}
}
function pd()
{
if (!document.all)
return
if (i > from)
{
pochenderText.style.filter = "Glow(Color=" + textcolor + ", Strength=" + i + ")";
i--;
theTimeout = setTimeout('pd()',speed);
return 0;
}
if (i = from)
{
theTimeout = setTimeout('pu()',speed);
return 0;
}
}
// -->
</SCRIPT>
</BODY></HTML>
نویسنده : علی مهاجر
کد دکمه ی
ذخیره ی صفحه
<script>
// CREDITS:
// salar mehrabi
// Copyright (c) 2003 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.javakhafan.9f.com
// IMPORTANT:
// If you add this script to a script-library or a script-archive
// you have to insert a link to http://www.javacity.co.sr
// right into the webpage where the script will be displayed.
function doSaveAs(){
if (document.execCommand){
document.execCommand("SaveAs")
}
else {
alert("Save-feature available only in Internet Exlorer 5.x.")
}
}
</script>
<form>
<input type="button" value="Save This WebPage" onClick="doSaveAs()"
</form>
نویسنده : علی مهاجر
کد دو خط
به دنبال موس
<!-- 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 -->
نویسنده : علی مهاجر
کد ساعت و
تاریخ به دنبال موس
<!--END CODE - Powered java script code by <span lang="en-us"><font color="#FFFFFF"><b>
<font size="5" color="#FFFFFF">
<a href="http://AliErfan84.Blogfa.com">http://AliErfan84.Blogfa.com</a></font></b></font></span>-->
<SCRIPT language=JavaScript>
dCol='cc0099';//date colour.
fCol='ff99cc';//face colour.
sCol='cc99ff';//seconds colour.
mCol='008000';//minutes colour.
hCol='000080';//hours colour.
ClockHeight=40;
ClockWidth=40;
ClockFromMouseY=0;
ClockFromMouseX=100;
//Alter nothing below! Alignments will be lost!
d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");
m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER");
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');
H='ooo';
H=H.split('');
M='oooo';
M=M.split('');
S='.....';
S=S.split('');
Face='1 2 3 4 5 6 7 8 9 10 11 12';
font='tohoma';
size=1;
speed=0.6;
ns=(document.layers);
ie=(document.all);
Face=Face.split(' ');
n=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=360/n;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
step=0.06;
currStep=0;
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
if (ns){
for (i=0; i < D.length; i++)
document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[i]+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[i]+'</font></center></layer>');
for (i=0; i < S.length; i++)
document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
for (i=0; i < M.length; i++)
document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
for (i=0; i < H.length; i++)
document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');
}
if (ie){
document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < D.length; i++)
document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++)
document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H[i]+'</div>');
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++)
document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M[i]+'</div>');
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++)
document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S[i]+'</div>');
document.write('</div></div>')
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
if (ie){
Od.style.top=window.document.body.scrollTop;
Of.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for (i=0; i < n; i++){
var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;
F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
}
for (i=0; i < H.length; i++){
var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;
HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);
}
for (i=0; i < M.length; i++){
var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;
ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);
}
for (i=0; i < S.length; i++){
var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;
SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);
}
for (i=0; i < D.length; i++){
var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style;
DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
}
currStep-=step;
}
function Delay(){
scrll=(ns)?window.pageYOffset:0;
Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
for (i=1; i < D.length; i++){
Dy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed);
Dx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed);
}
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (i=1; i < n; i++){
y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
}
ClockAndAssign();
setTimeout('Delay()',20);
}
if (ns||ie)window.onload=Delay;
</SCRIPT>
نویسنده : علی مهاجر
نشان
دهنده ی تصاویر
<!-- Drop Down Image Preview
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 -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function CoffeePreview(sel) {
document.CoffeePreview.src = "" + sel.options[sel.selectedIndex].value;
}
function CoffeeShow(sel) {
images = new Array();
images[1] = "1.jpg";
images[2] = "2.jpg";
images[3] = "3.jpg";
images[4] = "4.jpg";
images[5] = "5.jpg";
images[6] = "6.jpg";
window.location.href = images[sel.selectedIndex+1];
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<center>
<form name=previewselect>
<select name=selbox size=1 onChange="CoffeePreview(this)">
<option value="1-small.jpg">Image #1
<option value="2-small.jpg">Image #2
<option value="3-small.jpg">Image #3
<option value="4-small.jpg">Image #4
<option value="5-small.jpg">Image #5
<option value="6-small.jpg">Image #6
</select>
<p>
<img name="preview" src="1-small.jpg" width=150 height=113 border=1>
<p>
<input type=button value="view Image" onclick="CoffeeShow(this.form.selbox)">
</form>
</center>
نویسنده : علی مهاجر
کد
بر داشتن آندرلاین از زیر لینکها
<!-- Start Of No Underlined Links Script -->
<!-- This script takes the underline off of links. -->
<!-- Instructions: Just put this script anywhere on your webpage
before links that you wish not to have underlined. -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<STYLE TYPE="text/css">
<!--
A { text-decoration: none; }
A:link { color: #000099; }
A:visited { color: #000099; }
-->
</STYLE>
<!-- End Of No Underlined Links Script -->
نویسنده : علی مهاجر
باز شدن
پنجره ای کوچک به همراه پنجره ی اصلی
<HEAD>
<!-- DESCRIPTION: This will make a small Navigation Window in which you can place links to different pages.
INSTRUCTIONS: Place this script in the HEAD tags of
your webpage.
FUNCTIONALITY: Works in both Netscape & IE.
-->
<SCRIPT LANGUAGE="JavaScript">
//Modified by CoffeeCup Software
//This code is Copyright (c) 1997 CoffeeCup Software
//all rights reserved. License is granted to a single user to
//reuse this code on a personal or business Web Site.
<!--
coffeeWin=window.open("","coffeeWin","toolbar=no,width=200,height=250,directories=no,menubar=no,SCROLLBARS=no");
coffeeWin.document.write("<HTML>");
coffeeWin.document.write("<HEAD>");
coffeeWin.document.write("</HEAD>");
coffeeWin.document.write("<BODY BGCOLOR=#FFFFFF TEXT=#000000 LINK=#0000FF VLINK=#0000FF>")
coffeeWin.document.write("<CENTER>")
coffeeWin.document.write("<FONT FACE=VERDANA,ARIAL SIZE=2>");
coffeeWin.document.write("<B>");
coffeeWin.document.write("<FONT SIZE=3>Navigation Window</FONT>");
coffeeWin.document.write("<BR><HR WIDTH=180><BR><P>");
coffeeWin.document.write("<A HREF=http://www.webloger.5u.com TARGET=MAIN>Webloger Website</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("<A HREF=http://www.microsoft.com TARGET=MAIN>Microsoft</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("<A HREF=http://www.netscape.com TARGET=MAIN>Netscape</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("<A HREF=http://www.infoseek.com TARGET=MAIN>InfoSeek</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("</B>");
coffeeWin.document.write("</FONT>");
coffeeWin.document.write("</BODY>");
coffeeWin.document.write("</HTML>");
//-->
</SCRIPT>
</HEAD>
نویسنده : علی مهاجر
کد
رقص متن در صفحه
<script language="JavaScript1.2">
//configure message
message="Welcome to http://AliErfan84.Blogfa.com"
//animate text in NS6? (0 will turn it off)
ns6switch=1
var ns6=document.getElementById&&!document.all
mes=new Array();
mes[0]=-1;
mes[1]=-4;
mes[2]=-7;mes[3]=-10;
mes[4]=-7;
mes[5]=-4;
mes[6]=-1;
num=0;
num2=0;
txt="";
function jump0(){
if (ns6&&!ns6switch){
jump.innerHTML=message
return
}
if(message.length > 6){
for(i=0; i != message.length;i++){
txt=txt+"<span style='position:relative;' id='n"+i+"'>"+message.charAt(i)+"</span>"};
jump.innerHTML=txt;
txt="";
jump1a()
}
else{
alert("Your message is to short")
}
}
function jump1a(){
nfinal=(document.getElementById)? document.getElementById("n0") : document.all.n0
nfinal.style.left=-num2;
if(num2 != 9){
num2=num2+3;
setTimeout("jump1a()",50)
}
else{
jump1b()
}
}
function jump1b(){
nfinal.style.left=-num2;
if(num2 != 0){num2=num2-3;
setTimeout("jump1b()",50)
}
else{
jump2()
}
}
function jump2(){
txt="";
for(i=0;i != message.length;i++){
if(i+num > -1 && i+num < 7){
txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>"
}
else{txt=txt+"<span>"+message.charAt(i)+"</span>"}
}
jump.innerHTML=txt;
txt="";
if(num != (-message.length)){
num--;
setTimeout("jump2()",50)}
else{num=0;
setTimeout("jump0()",50)}}
</script>
</head>
<body>
<h2><div id="jumpx" style="color:green"></div></h2>
<script>
if (document.all||document.getElementById){
jump=(document.getElementById)? document.getElementById("jumpx") : document.all.jumpx
jump0()
}
else
document.write(message)
</script>
Top Java Script in <font face="Tahoma" size="2"> <a href=http://www.javacity.co.sr>کدهاي جاوا اسکريپت</a>
</font>
نویسنده : علی مهاجر
کد
نمایش متن در استاتوس بار با رفتن بر روی تصویر
<!-- This displays 'Your Message Here' in the status bar when the mouse -->
<!-- pointer is over the 'Put Image Here' image -->
<CENTER>
<A HREF="URL" onMouseOver="window.status='Your Message Here'; return true"
onMouseOut="window.status=''">
<P><IMG SRC="Put Image Here"></A>
</CENTER>
<!-- This displays 'Your Message Here' in the status bar when the mouse -->
<!-- pointer is over the 'Put Image Here' image -->
<CENTER>
<A HREF="URL" onMouseOver="window.status='Your Message Here'; return true"
onMouseOut="window.status=''">
<P><IMG SRC="Put Image Here"></A>
</CENTER>
نویسنده : علی مهاجر
کد
نمایش پنجره ای با کلیک کردن بر روی یک دکمه
<HTML>
<HEAD>
<!--START OF PopUp on Button Click-->
<!-This script will give you 4 buttons that display pop up windows when clicked. -->
<!-- Instructions:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<SCRIPT LANGUAGE="JavaScript">
function AlertCC(label, msg)
{
var cc1 =
"<TITLE>Window Title</TITLE>" +
"<BODY BGCOLOR='FFFFFF'><TABLE BORDER=0><TR>" +
"<TD WIDTH=90% HEIGHT=90 VALIGN=TOP ALIGN=LEFT>"+
"<FONT SIZE=4 FACE=ARIAL>"
var cc2 = "<FONT COLOR='FF0000'><B>"+label+"</B></FONT><BR><P>"
var cc3 =
"</TD><TD WIDTH=10%> </TD></TR><TR><TD> </TD>"+
"<TD VALIGN=BOTTOM ALIGN=RIGHT>"+
"<FORM><INPUT TYPE='BUTTON' VALUE='Close Window'" +
"onClick='self.close()'>" +
"</FORM></TD></TR></TABLE></BODY>"
popup = window.open("","popDialog","height=280,width=400,scrollbars=no")
popup.document.write(cc1+cc2+msg+cc3)
popup.document.close()
}
function ccalert1()
{
AlertCC('Alert One', 'This script will let you place information about your product or topic of choice.')
}
function ccalert2()
{
AlertCC('Alert Two', 'This script will let you place information about your product or topic of choice.')
}
function ccalert3()
{
AlertCC('Alert Three', 'This script will let you place information about your product or topic of choice.')
}
function ccalert4()
{
AlertCC('Alert Four', 'This script will let you place information about your product or topic of choice.')
}
</SCRIPT>
</HEAD>
<BODY>
<CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert One ]" onClick="ccalert1()"></FORM></CENTER><p>
<CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert Two ]" onClick="ccalert2()"></FORM></CENTER><p>
<CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert Three ]" onClick="ccalert3()"></FORM></CENTER><p>
<CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert Four ]" onClick="ccalert4()"></FORM></CENTER><p>
<!-- END OF SCRIPT -->
نویسنده : علی مهاجر
کد
نمایش پیغام با کلیک بر روی یک دکمه
<!-- Start of Message Alert -->
<!-- Use this button in a form to pop-up a message when the user clicks it -->
<form>
<input type="button" value="message" onClick="alert('YOUR MESSAGE GOES HERE'); return true">
</form>
<!-- End of Message Alert -->
نویسنده : علی مهاجر
کد
رقص متن در استاتوس بار 1
<!-- DESCRIPTION: This will make your text bounce in the
status bar of the browser.
INSTRUCTIONS: Place this script in the HEAD tags of
your webpage. Then place the text you want to be bounced in
the area that says, "YOUR MESSAGE HERE".
FUNCTIONALITY: Works in both Netscape & IE.
-->
<SCRIPT LANGUAGE="JavaScript">
//Modified by CoffeeCup Software
//This code is Copyright (c) 1997 CoffeeCup Software
//all rights reserved. License is granted to a single user to
//reuse this code on a personal or business Web Site.
var yourtext = "* YOUR MESSAGE HERE! *";
var wedge1=" ";
var wedge2=" ";
var message1=wedge1+yourtext+wedge2;
var dir = "lside";
var speed = 50;
function bouncey() {
if (dir == "lside") {
message2=message1.substring(2,message1.length)+" ";
window.status=message2;
setTimeout("bouncey();",speed);
message1=message2;
if (message1.substring(0,1) == "*") {
dir="rside";
}
}
else {
message2=" "+message1.substring(0,message1.length-2);
window.status=message2;
setTimeout("bouncey();",speed);
message1=message2;
if (message1.substring(message1.length-1,message1.length) == "*") {
dir="lside";
}
}
}
// -- End Hiding Here -->
</SCRIPT>
<body onLoad="bouncey()">
نویسنده : علی مهاجر
کد
رقص متن در استاتوس بار 2
<!-- DESCRIPTION: This will make your text bounce in the
status bar of the browser.
INSTRUCTIONS: Place this script in the HEAD tags of
your webpage. Then place the text you want to be bounced in
the area that says, "YOUR MESSAGE HERE".
FUNCTIONALITY: Works in both Netscape & IE.
-->
<SCRIPT LANGUAGE="JavaScript">
//Modified by CoffeeCup Software
//This code is Copyright (c) 1997 CoffeeCup Software
//all rights reserved. License is granted to a single user to
//reuse this code on a personal or business Web Site.
var yourtext = "* YOUR MESSAGE HERE! *";
var wedge1=" ";
var wedge2=" ";
var message1=wedge1+yourtext+wedge2;
var dir = "lside";
var speed = 50;
function bouncey() {
if (dir == "lside") {
message2=message1.substring(2,message1.length)+" ";
window.status=message2;
setTimeout("bouncey();",speed);
message1=message2;
if (message1.substring(0,1) == "*") {
dir="rside";
}
}
else {
message2=" "+message1.substring(0,message1.length-2);
window.status=message2;
setTimeout("bouncey();",speed);
message1=message2;
if (message1.substring(message1.length-1,message1.length) == "*") {
dir="lside";
}
}
}
// -- End Hiding Here -->
</SCRIPT>
<body onLoad="bouncey()">
نویسنده : علی مهاجر
کد
رقص متن در استاتوس بار 3
<!-- Start of Typing Text Script -->
<!-- This types one letter at a time in the Status bar -->
<!-- Instructions: Just put this script anywhere on your webpage
and you will have the typewriter effect on your messages
displayed in the status bar.
To change the speed of your banner increase or decrease the
value for 'var speed'.
(Note: decreasing this value increases the speed of your banner.)
To change the pause between each message change the value
for 'var pause'.
(Note: increase value to increase pause.)
-->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<SCRIPT LANGUAGE="JavaScript">
var speed = 100
var pause = 1000
var timerID = null
var texttype = false
var ar = new Array()
ar[0] = "This is the Typing Text Javascript"
ar[1] = "CoffeeCup Software is cool!"
ar[2] = "El HTML Editor++ es muy bueno!"
var msgnow = 0
var offset = 0
function stopBanner() {
if (texttype)
clearTimeout(timerID)
texttype = false
}
function startBanner() {
stopBanner()
showBanner()
}
function showBanner() {
var text = ar[msgnow]
if (offset < text.length) {
if (text.charAt(offset) == " ")
offset++
var partialMessage = text.substring(0, offset + 1)
window.status = partialMessage
offset++
timerID = setTimeout("showBanner()", speed)
texttype = true
} else {
offset = 0
msgnow++
if (msgnow == ar.length)
msgnow = 0
timerID = setTimeout("showBanner()", pause)
texttype = true
}
}
</SCRIPT>
</HEAD>
<BODY onLoad="startBanner()">
</BODY>
</HTML>
<!-- END OF SCRIPT -->
<!/SCRIPT>
نویسنده : علی مهاجر
کد
رقص متن در استاتوس 4
<!-- Start of Status Blinker -->
<!-- This will put a blinking status bar message in your webpage.
Important: There are two parts to this script, one goes
in between the HEAD tags and one goes in the BODY tag.
-->
<script>
var yourwords = "Javakhafan.7p.com";
var speed = 300;
var control = 1;
function flash()
{
if (control == 1)
{
window.status=yourwords;
control=0;
}
else
{
window.status="";
control=1;
}
setTimeout("flash()",speed);
}
</script>
<!--You can control the speed of the flashing in this script. You just need to change the speed number 300. Bigger the number the slower it goes.-->
<!-- From this part on up goes in between the HEAD tags -->
<body onLoad="flash()">
<!-- End of Status Blinker -->
نویسنده : علی مهاجر
کد
ماکزیمایز شدن صفحه به صورت خودکار
<!-- 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 (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>
<!-- END OF Window Auto Maximize DHTML -->
نویسنده : علی مهاجر
کد
لینک زیر شاخه ای
<!-- 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");
}
//-->
</SCRIPT>
<CENTER>
<FORM NAME="myform">
<SELECT NAME="dest" SIZE=1>
<OPTION VALUE="http://www.coffeecup.com">CoffeeCup Software
<OPTION VALUE="http://www.tmcm.com">Too Much Coffee Man
<OPTION VALUE="http://www.netscape.com">Netscape
<OPTION VALUE="http://www.javakhafan.7p.com">InfoSeek
</SELECT>
<P>
<INPUT TYPE="BUTTON" VALUE="Go !" onClick="surfto(this.form)">
</FORM>
</CENTER>
نویسنده : علی مهاجر
کد نمایش
متن به صورت متحرک
<!-- Start of Self-Scroll TextArea -->
<!-- Scrolls text upwards until all of your message has been displayed. -->
<!-- Instructions:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function CC_Scroller(n) {
optlist = document.scrollform.scroller;
optlist[optlist.length] = new Option(optlist[0].text, "", false, false);
optlist[0] = null;
optlist.selectedIndex = -1;
n = (n + 1) % optlist.length;
// change the speed below: 1000 = 1 second.
setTimeout("CC_Scroller("+n+")",2000);
}
// End -->
</script>
</HEAD>
<BODY OnLoad="CC_Scroller(0);">
<center>
<form name="scrollform">
<select name="scroller" size=8>
<option>
<option>
<option>
<option>
<option>
<option>
<option>
<option>
<option>This textarea will auto
<option>scroll text moving it
<option>upwards until all the
<option>lines have been displayed.
<option>
<option>
<option>You can leave as many
<option>blank lines as you feel
<option>necessary to give the
<option>look of begining and
<option>ending.
<option>
<option>Neat, huh?
<option>
</select>
</form>
</center>
<!-- End of Self-Scroll TextArea -->
نویسنده : علی مهاجر
کد باز
شدن صفحه ای جدید
<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.javacity.co.sr"
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>
نویسنده : علی مهاجر
کد
ساعتهای زنده ی دنیا
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<title>New Page 2</title>
</head>
<body>
<table border="0" width="200" cellspacing="0" cellpadding="3">
<form name="where">
<tr>
<td width="100%">
<select name="city" size="1" onchange="updateclock(this);">
<option value="" selected>Local time</option>
<option value="0">London GMT</option>
<option value="1">Rome</option>
<option value="7">Bangkok</option>
<option value="8">Hong Kong</option>
<option value="9">Tokyo</option>
<option value="10">Sydney</option>
<option value="12">Fiji</option>
<option value="-10">Hawaii</option>
<option value="-8">San Francisco</option>
<option value="-5">New York</option>
<option value="-3">Buenos Aires</option>
</select>
</td>
</tr>
<tr>
<td width="100%">
<script language="JavaScript">
/*
Drop Down World Clock- By Learn iran (http://www.webloger.5u.com)
Portions of code by Kurt @ http://www.webloger.5u.com/
This credit notice must stay intact
*/
if (document.all||document.getElementById)
document.write('<span id="worldclock" style="font:bold 16px Arial;"></span><br>')
zone=0;
isitlocal=true;
ampm='';
function updateclock(z){
zone=z.options[z.selectedIndex].value;
isitlocal=(z.options[0].selected)?true:false;
}
function WorldClock(){
now=new Date();
ofst=now.getTimezoneOffset()/60;
secs=now.getSeconds();
sec=-1.57+Math.PI*secs/30;
mins=now.getMinutes();
min=-1.57+Math.PI*mins/30;
hr=(isitlocal)?now.getHours():(now.getHours() + parseInt(ofst)) + parseInt(zone);
hrs=-1.575+Math.PI*hr/6+Math.PI*parseInt(now.getMinutes())/360;
if (hr < 0) hr+=24;
if (hr > 23) hr-=24;
ampm = (hr > 11)?"PM":"AM";
statusampm = ampm.toLowerCase();
hr2 = hr;
if (hr2 == 0) hr2=12;
(hr2 < 13)?hr2:hr2 %= 12;
if (hr2<10) hr2="0"+hr2
var finaltime=hr2+':'+((mins < 10)?"0"+mins:mins)+':'+((secs < 10)?"0"+secs:secs)+' '+statusampm;
if (document.all)
worldclock.innerHTML=finaltime
else if (document.getElementById)
document.getElementById("worldclock").innerHTML=finaltime
else if (document.layers){
document.worldclockns.document.worldclockns2.document.write(finaltime)
document.worldclockns.document.worldclockns2.document.close()
}
setTimeout('WorldClock()',1000);
}
window.onload=WorldClock
//-->
</script>
<!--Place holder for NS4 only-->
<ilayer id="worldclockns" width=100% height=35><layer id="worldclockns2" width=100% height=35 left=0 top=0 style="font:bold 16px Arial;"></layer></ilayer>
<p>
<font face="arial" size="-2">This free script provided by
<a href="http://www.webloger.5u.com/">webloger site</a></font>
</td>
</form>
</tr>
</table>
</body>
</html>
نویسنده : علی مهاجر
کد روشن
شدن متن
<meta http-equiv="Content-Language" content="en-us">
<h2>
<script language="JavaScript1.2">
/*
Neon Lights Text
By JavaScript (http://learniran.com)
Over 500+ free scripts here!
*/
var message="Welcome to my weblog!"
var neonbasecolor="gray"
var neontextcolor="yellow"
var flashspeed=100 //in milliseconds
///No need to edit below this line/////
var n=0
if (document.all){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight">'+message.charAt(m)+'</span>')
document.write('</font>')
//cache reference to neonlight array
var tempref=document.all.neonlight
}
else
document.write(message)
function neon(){
//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
tempref[m].style.color=neonbasecolor
}
//cycle through and change individual letters to neon color
tempref[n].style.color=neontextcolor
if (n<tempref.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}
function beginneon(){
if (document.all)
flashing=setInterval("neon()",flashspeed)
}
beginneon()
</script>
</h2>
<p align="center"><font face="Tahoma" size="2">
<a href="http://www.javacity.co.sr/">webloger site</a></font></p>
</body>
</html>
نویسنده : علی مهاجر
کد راست
کلیک قفل کردن که دو بار کلیک کند کارش تمومه
</style>
<SCRIPT language=JavaScript>
document.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("I said NO right clicking! click ok to exit LMAO!");
bye() }
</SCRIPT>
نویسنده : علی مهاجر
تنظیم رنگ
بکگراند توسط کاربر با کلیک بر روی کلیدهای مورد نظر
<body>
<script language="Javascript">
<!--
// please keep these lines on when you copy the source
// made by: ali - http://AliErfan84.Blogfa.com
function backbs(clr) {
document.bgColor = clr
}
//-->
</script>
<form>
<input type="button" value="???" onclick="backbs('yellow')">
<input type="button" value="????" onclick="backbs('khaki')">
<input type="button" value="????" onclick="backbs('white')">
<input type="button" value="????" onclick="backbs('gray')">
<input type="button" value="????" onclick="backbs('black')">
<input type="button" value="?????" onclick="backbs('pink')">
<input type="button" value="???" onclick="backbs('blue')">
<input type="button" value="???" onclick="backbs('Green')">
<input type="button" value="???? ??" onclick="backbs('silver')">
<input type="button" value="??? ????" onclick="backbs('teal')">
<input type="button" value="??? ????;" onclick="backbs('lime')">
<input type="button" value="???? ??" onclick="backbs('navy')">
<input type="button" value="????" onclick="backbs('red')">
<input type="button" value="??????" onclick="backbs('orange')">
<input type="button" value="???? ??" onclick="backbs('olive')">
</form>
</script>
</body>
نویسنده : علی مهاجر
تغییر رنگ
پس زمینه هنگام ورود به صفحه که بعد از ان روی رنگ مشکی ثابت میماند
<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">
نویسنده : علی مهاجر
تغییر رنگ
پس زمینه توسط یک کادر انتخاب
<BODY>
<FORM>
<!--Total Java Scripts 99 - Next Step Software-->
<SELECT Size=5 name=clr onChange="document.bgColor=this.options[this.selectedIndex].value">
<OPTION VALUE="blue">blue
<OPTION VALUE="aquamarine">aquamarine
<OPTION VALUE="chocolate">chocolate
<OPTION VALUE="darkred">dark red
<OPTION VALUE="gold">gold
<OPTION VALUE="red">red
<OPTION VALUE="yellow">yellow
<OPTION VALUE="hotpink">hotpink
<OPTION VALUE="lime">lime
<OPTION VALUE="darkkhaki">dark khaki
<OPTION VALUE="cadetblue ">cadet blue
<OPTION VALUE="darkgoldenrod">dark goldenrod
<OPTION VALUE="darkslateblue">dark slate
<OPTION VALUE="blue">blue
<OPTION VALUE="deeppink">deep pink
<OPTION VALUE="darksalmon">dark salmon
<OPTION VALUE="salmon">salmon
<OPTION VALUE="tan">tan
<OPTION VALUE="wheat">wheat
<OPTION VALUE="tomato">tomato
<OPTION VALUE="springgreen">springgreen
<OPTION VALUE="turquoise">turquoise
<OPTION VALUE="white" SELECTED>White
</SELECT>
</FORM>
<!-- Script Size: 1.24 KB -->
نویسنده : علی مهاجر
تغییر رنگ
پس زمینه با یک دکمه
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function backcolor(form) {
temp = ""
for (var i = 0; i < 16; i++) {
temp = form.color[i].value
if (form.color[i].checked){ document.bgColor = temp }
}
}
function randombackground() {
document.bgColor = getColor()
}
function getColor(){
currentdate = new Date()
backgroundcolor = currentdate.getSeconds()
if (backgroundcolor > 44)
backgroundcolor = backgroundcolor - 45
else if (backgroundcolor > 29)
backgroundcolor = backgroundcolor - 30
else if (backgroundcolor > 15)
backgroundcolor = backgroundcolor - 16
if (backgroundcolor == 0 )
return "olive";
else if (backgroundcolor == 1 )
return "teal";
else if (backgroundcolor == 2 )
return "red";
else if (backgroundcolor == 3 )
return "blue";
else if (backgroundcolor == 4 )
return "maroon";
else if (backgroundcolor == 5 )
return "navy";
else if (backgroundcolor == 6 )
return "lime";
else if (backgroundcolor == 7 )
return "fuschia";
else if (backgroundcolor == 8 )
return "green";
else if (backgroundcolor == 9 )
return "purple";
else if (backgroundcolor == 10 )
return "gray";
else if (backgroundcolor == 11 )
return "yellow";
else if (backgroundcolor == 12 )
return "aqua";
else if (backgroundcolor == 13 )
return "black";
else if (backgroundcolor == 14 )
return "white";
else if (backgroundcolor == 15 )
return "silver";
}
// End -->
</SCRIPT>
<!-- STEP TWO: Put this form in the BODY of the HTML document -->
<BODY>
<CENTER>
<FORM>
<input type="button" value="Get Another Random Background" onClick="randombackground()">
</FORM>
</CENTER>
<!-- Script Size: 2.00 KB -->
نویسنده : علی مهاجر
تغییر رنگ
زمینه به صورت چشمک زن که مجدد به حالت اول باز میگردد
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function blinkit(){
intrvl=0;
for(nTimes=0;nTimes<3;nTimes++){
intrvl += 200;
setTimeout("document.bgColor='#0000FF';",intrvl);
intrvl += 200;
setTimeout("document.bgColor='#FFFFFF';",intrvl);
}
}
// End -->
</SCRIPT>
<!-- CONTINUE -->
<BODY>
<CENTER>
<FORM>
<INPUT TYPE="BUTTON" VALUE="Blink" onClick="blinkit()">
</FORM>
<!-- END Script Size: 1.01 KB -->
نویسنده : علی مهاجر
تغییر رنگ
پس زمینه با قرار گرفتن نشانگر موس بر روی لینکهای مختلف
<!-- http://AliErfan84.Blogfa.com -->
<!-- START -->
<BODY>
<!-- This script and many more are available online free at -->
<! >
<A HREF="" ONMOUSEOVER ="document.bgColor='silver'">T</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightslategray'">r</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='azure'">y</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightgreen'">m</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightblue'">o</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='white'">v</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightslategray'">i</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='azure'">n</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightgreen'">g</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightblue'">y</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='white'">o</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='silver'">u</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightslategray'">r</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='azure'">c</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightgreen'">u</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightblue'">r</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='white'">s</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightslategray'">e</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='azure'">r</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightgreen'">a</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightblue'">r</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='white'">o</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='silver'">u</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightslategray'">n</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='azure'">d</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightgreen'">o</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightblue'">n</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='white'">t</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightslategray'">h</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='azure'">i</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightgreen'">s</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightblue'">t</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='white'">e</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='silver'">x</a>
<A HREF="" ONMOUSEOVER ="document.bgColor='lightslategray'">t</a>
<!-- END Script Size: 2.46 KB -->
نویسنده : علی مهاجر
با اين كد در
يك باكس متن بعد از فشردن دكمه ی سابميت
همه ی حروف به شكل كوچك آن
تبديل و فرستاده خواهند شد
<BODY>
<center>
<form name="capsform">
<input type="text" name="caps" size=40 value="" onChange="javascript:this.value=this.value.toLowerCase();">
<br>
<input type="button" value="Ok!">
</form>
</center>
<!-- END Script Size: 0.55 KB -->
نویسنده : علی مهاجر
با اين اسكريپت كاربر در يك صفحه اطلاعات خود را وارد ميكند
و
اين اطلاعات براي شما از طریق ایمیل فرستاده ميشود
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function resetform() {
document.forms[0].elements[1]=="";
}
function submitForms() {
if (isEmail() && isFname() && isLname() && isAddress() && isCity() && isState() && isZip())
if (confirm("\n You are about to e-mail your submission. \n\nYES to submit. NO to abort."))
{
alert("\nYour submission will now be sent. \n\n Use the Return Button once the submission is complete to return to my home page.\n\n\n Thank you for joining our mailing list!");
return true;
}
else
{
alert("\n You have chosen to abort the submission.");
return false
}
else
return false;
}
function isEmail() {
if (document.forms[0].elements[1].value == "") {
alert ("\n The E-Mail field is blank. \n\n Please enter your E-Mail address.")
document.forms[0].elements[1].focus();
return false;
}
if (document.forms[0].elements[1].value.indexOf ('@',0) == -1 ||
document.forms[0].elements[1].value.indexOf ('.',0) == -1) {
alert ("\n The E-Mail field requires a \"@\" and a \".\"be used. \n\nPlease re-enter your E-Mail address.")
document.forms[0].elements[1].select();
document.forms[0].elements[1].focus();
return false;
}
return true;
}
function isFname() {
if (document.forms[0].elements[2].value == "")
{
alert ("\n The First Name field is blank. \n\n Please enter your first name.")
document.forms[0].elements[2].focus();
return false;
}
return true;
}
function isLname() {
if (document.forms[0].elements[3].value == "") {
alert ("\n The Last Name field is blank. \n\nPlease enter your last name.")
document.forms[0].elements[3].focus();
return false;
}
return true;
}
function isAddress() {
if (document.forms[0].elements[4].value == "") {
alert ("\n The Address field is blank. \n\nPlease enter your address.")
document.forms[0].elements[4].focus();
return false;
}
return true;
}
function isCity()
{
if (document.forms[0].elements[5].value == "")
{
alert ("\n The City field is blank. \n\nPlease enter your city.")
document.forms[0].elements[5].focus();
return false;
}
return true;
}
function isState() {
if (document.forms[0].elements[6].value == "") {
alert ("\n The state field is blank.\n\nPlease enter your state.")
document.forms[0].elements[6].focus();
return false;
}
return true;
}
function isZip() {
if (document.forms[0].elements[7].value == "") {
alert ("\n The Zip code field is blank. \n\nPlease enter your Zip code.")
document.forms[0].elements[7].focus();
return false;
}
return true;
}
// End -->
</SCRIPT>
<!-- CONTINUE -->
<BODY>
<CENTER>
<FORM enctype="text/plain" name="addform" method='get'
action='mailto:antispammer@earthling.net?subject=TJS - Mailing List' onSubmit="return submitForms()">
<TABLE border=3 width=430 cellpadding=10><TD align="center">
<strong>
<font face="arial" size=+2>Join the Mailing List!</font>
</strong>
</TABLE>
<input type="hidden" name="Form" value="Submit Sub">
<TABLE border=3 cellspacing=0 cellpadding=2 bgcolor="#C0C0C0">
<tr valign=baseline>
<TD>
<font face="arial">Email Address:</font>
</TD>
<TD>
<input type=text name="Email Address" size=35,1 maxlength=80>
</TD>
</tr>
<tr>
<TD>
<font face="arial">First Name:</font>
</TD>
<TD>
<input type=text name="First Name" size=35,1 maxlength=80>
</TD></tr>
<tr>
<TD>
<font face="arial">Last Name:</font>
</TD>
<TD>
<input type=text name="Last Name" size=35,1 maxlength=80>
</TD></tr>
<tr>
<TD>
<font face="arial">Address:</font>
</TD>
<TD>
<input type=text name="Address" size=35,1 maxlength=80>
</TD></tr>
<tr>
<TD>
<font face="arial">City:</font>
</TD>
<TD>
<input type=text name="City" size=35,1 maxlength=80>
</TD></tr>
<tr>
<TD>
<font face="arial">State:</font>
</TD>
<TD>
<input type=text name="State" size=10,1 maxlength=25>
</TD></tr>
<tr>
<TD>
<font face="arial">Zip Code:</font>
</TD>
<TD>
<input type=text name="Zip" size=20,1 maxlength=35>
</TD></tr></TABLE>
<br>
<center>
<input type="submit" value=" Submit ">
<input type="button" value=" Return " onclick="window.location='your-page.html'">
<input type="reset" value="Reset Form" onclick=resetform()>
</FORM>
</CENTER>
<!-- END Script Size: 4.56 KB -->
نویسنده : علی مهاجر
تیک زدن
یا برداشتن آیتمها
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Modified By: Steve Robison, Jr. (stevejr@ce.net) -->
<!-- Begin
var checkflag = "false";
function check(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Uncheck All"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Check All"; }
}
// End -->
</script>
</HEAD>
<!-- CONTINUE -->
<BODY>
<center>
<form name=myform action="" method=post>
<table>
<tr><td>
<b>Your Favorite Scripts & Languages</b><br>
<input type=checkbox name=list value="1">Java<br>
<input type=checkbox name=list value="2">JavaScript<br>
<input type=checkbox name=list value="3">ASP<br>
<input type=checkbox name=list value="4">HTML<br>
<input type=checkbox name=list value="5">SQL<br>
<br>
<input type=button value="Check All" onClick="this.value=check(this.form.list)">
</td></tr>
</table>
</form>
</center>
<!-- END Script Size: 1.47 KB -->
نویسنده : علی مهاجر
ی وسيله
ی اين كد با تيك خوردن يكی از آيتم ها كه گزينه ی همه ميباشد , بقيه ی تيك ها
برداشته ميشود
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Scott Waichler -->
<!-- Begin
function checkChoice(field, i) {
if (i == 0) { // "All" checkbox selected.
if (field[0].checked == true) {
for (i = 1; i < field.length; i++)
field[i].checked = false;
}
}
else { // A checkbox other than "Any" selected.
if (field[i].checked == true) {
field[0].checked = false;
}
}
}
// End -->
</script>
</HEAD>
<!-- CONTINUE -->
<BODY>
<center>
Please select your favorite class(es):
<form name=pickform>
<table>
<tr><td>
<input type=checkbox name=classes value="*" onclick="checkChoice(document.pickform.classes, 0)" checked>All
<br>
<input type=checkbox name=classes value="science" onclick="checkChoice(document.pickform.classes, 1)">Science
<br>
<input type=checkbox name=classes value="math" onclick="checkChoice(document.pickform.classes, 2)">Math
<br>
<input type=checkbox name=classes value="english" onclick="checkChoice(document.pickform.classes, 3)">English
<br>
<input type=checkbox name=classes value="history" onclick="checkChoice(document.pickform.classes, 4)">Histroy
<br>
<input type=checkbox name=classes value="other" onclick="checkChoice(document.pickform.classes, 5)">Other
</td></tr>
</table>
</form>
</center>
<!-- END Script Size: 1.78 KB -->
نویسنده : علی مهاجر
تست هوش
<style>
.jc{
position:relative;
}
</style>
<script language="JavaScript1.2">
//Trembling message script- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com
var ns6=document.getElementById&&!document.all
var ie=document.all
var customcollect=new Array()
var i=0
function jiggleit(num){
if ((!document.all&&!document.getElementById)) return;
customcollect[num].style.left=(parseInt(customcollect[num].style.left)==-1)? customcollect[num].style.left=1 : customcollect[num].style.left=-1
}
function init(){
if (ie){
while (eval("document.all.jiggle"+i)!=null){
customcollect[i]= eval("document.all.jiggle"+i)
i++
}
}
else if (ns6){
while (document.getElementById("jiggle"+i)!=null){
customcollect[i]= document.getElementById("jiggle"+i)
i++
}
}
if (customcollect.length==1)
setInterval("jiggleit(0)",80)
else if (customcollect.length>1)
for (y=0;y<customcollect.length;y++){
var tempvariable='setInterval("jiggleit('+y+')",'+'100)'
eval(tempvariable)
}
}
window.onload=init
</script>
نویسنده : علی مهاجر
بیلبرد تبلیغاتی
step1:copy this code to head
<style type="text/css">
/*Modify attributes of #contentwrapper below as desired*/
#contentwrapper{
width: 230px;
height: 200px;
border: 1px solid black;
background-color: #C6FFC6;
padding: 5px;
}
.billcontent{
width: 100%;
display:block;
}
</style>
<script type="text/javascript">
/***********************************************
* DHTML Billboard script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//List of transitional effects to be randomly applied to billboard:
var billboardeffects=["GradientWipe(GradientSize=1.0 Duration=0.7)", "Inset", "Iris", "Pixelate(MaxSquare=5 enabled=false)", "RadialWipe", "RandomBars", "Slide(slideStyle='push')", "Spiral", "Stretch", "Strips", "Wheel", "ZigZag"]
//var billboardeffects=["Iris"] //Uncomment this line and input one of the effects above (ie: "Iris") for single effect.
var tickspeed=2000 //ticker speed in miliseconds (2000=2 seconds)
var effectduration=500 //Transitional effect duration in miliseconds
var hidecontent_from_legacy=1 //Should content be hidden in legacy browsers- IE4/NS4 (0=no, 1=yes).
var filterid=Math.floor(Math.random()*billboardeffects.length)
document.write('<style type="text/css">\n')
if (document.getElementById)
document.write('.billcontent{display:none;\n'+'filter:progid:DXImageTransform.Microsoft.'+billboardeffects[filterid]+'}\n')
else if (hidecontent_from_legacy)
document.write('#contentwrapper{display:none;}')
document.write('</style>\n')
var selectedDiv=0
var totalDivs=0
function contractboard(){
var inc=0
while (document.getElementById("billboard"+inc)){
document.getElementById("billboard"+inc).style.display="none"
inc++
}
}
function expandboard(){
var selectedDivObj=document.getElementById("billboard"+selectedDiv)
contractboard()
if (selectedDivObj.filters){
if (billboardeffects.length>1){
filterid=Math.floor(Math.random()*billboardeffects.length)
selectedDivObj.style.filter="progid:DXImageTransform.Microsoft."+billboardeffects[filterid]
}
selectedDivObj.filters[0].duration=effectduration/1000
selectedDivObj.filters[0].Apply()
}
selectedDivObj.style.display="block"
if (selectedDivObj.filters)
selectedDivObj.filters[0].Play()
selectedDiv=(selectedDiv<totalDivs-1)? selectedDiv+1 : 0
setTimeout("expandboard()",tickspeed)
}
function startbill(){
while (document.getElementById("billboard"+totalDivs)!=null)
totalDivs++
if (document.getElementById("billboard0").filters)
tickspeed+=effectduration
expandboard()
}
if (window.addEventListener)
window.addEventListener("load", startbill, false)
else if (window.attachEvent)
window.attachEvent("onload", startbill)
else if (document.getElementById)
window.onload=startbill
</script>
step2:copy this code to body
<div id="contentwrapper">
<div id="billboard0" class="billcontent">
JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents.
</div>
<div id="billboard1" class="billcontent">
Java is completely different from JavaScript- it's more powerful, more complex, and unfortunately, a lot harder to master.
</div>
<div id="billboard2" class="billcontent">
Real life billboards use interesting transtional effects in between messages to catch viewers' attention. Well, so does this DHTML billboard script!
</div>
</div>
نویسنده : علی مهاجر
به حرکت درآوردن نوار بای
سایت
<SCRIPT>
//Arrow Head title- By Dynamic Drive
//Based on status bar script by Jason Rex (ali_erfan84@yahoo.com, http://AliErfan84.Blogfa.com)
//Visit http://AliErfan84.Blogfa.com for full source code
//change title text to your own
var titletext="Welcome to Dynamic Drive"
var thetext=""
var started=false
var step=0
var times=1
function welcometext()
{
times--
if (times==0)
{
if (started==false)
{
started = true;
document.title = titletext;
setTimeout("anim()",1);
}
thetext = titletext;
}
}
function showstatustext(txt)
{
thetext = txt;
setTimeout("welcometext()",4000)
times++
}
function anim()
{
step++
if (step==7) {step=1}
if (step==1) {document.title='>==='+thetext+'===<'}
if (step==2) {document.title='=>=='+thetext+'==<='}
if (step==3) {document.title='>=>='+thetext+'=<=<'}
if (step==4) {document.title='=>=>'+thetext+'<=<='}
if (step==5) {document.title='==>='+thetext+'=<=='}
if (step==6) {document.title='===>'+thetext+'<==='}
setTimeout("anim()",200);
}
if (document.title)
window.onload=onload=welcometext
</SCRIPT>
نویسنده : علی مهاجر
منوی زیبا
step1:copy this code to head
<style type="text/css">
#tablist{
padding: 3px 0;
margin-left: 0;
margin-bottom: 0;
margin-top: 0.1em;
font: bold 12px Verdana;
}
#tablist li{
list-style: none;
display: inline;
margin: 0;
}
#tablist li a{
text-decoration: none;
padding: 3px 0.5em;
margin-left: 3px;
border: 1px solid #778;
border-bottom: none;
background: white;
}
#tablist li a:link, #tablist li a:visited{
color: navy;
}
#tablist li a.current{
background: lightyellow;
}
#tabcontentcontainer{
width:480px;
height:40px;
}
.tabcontent{
display:none;
}
</style>
<script type="text/javascript">
/***********************************************
* DD Tab Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
//Set tab to intially be selected when page loads:
//[which tab (1=first tab), ID of tab content to display]:
var initialtab=[1, "sc1"]
var previoustab=""
function expandcontent(cid, aobject){
if (document.getElementById){
highlighttab(aobject)
if (previoustab!="")
document.getElementById(previoustab).style.display="none"
document.getElementById(cid).style.display="block"
previoustab=cid
}
}
function highlighttab(aobject){
if (typeof tabobjlinks=="undefined")
collecttablinks()
for (i=0; i<tabobjlinks.length; i++)
tabobjlinks[i].className=""
aobject.className="current"
}
function collecttablinks(){
var tabobj=document.getElementById("tablist")
tabobjlinks=tabobj.getElementsByTagName("A")
}
function do_onload(){
collecttablinks()
expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])
}
if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload
</script>
step2:copy this code to body
<ul id="tablist">
<li><a href="http://www.dynamicdrive.com/" onMouseover="expandcontent('sc1', this)">Dynamic Drive</a></li>
<li><a href="http://www.javascriptkit.com/" onMouseover="expandcontent('sc2', this)">JavaScript Kit</a></li>
<li><a href="http://www.codingforums.com/" onMouseover="expandcontent('sc3', this)">CodingForums</a></li>
<li><a href="http://www.webmasterpick.com/" onMouseover="expandcontent('sc4', this)">WebmasterPick</a></li>
</ul>
<DIV id="tabcontentcontainer">
<div id="sc1" class="tabcontent">
Visit Dynamic Drive for free, award winning DHTML scripts for your site:<br />
<a href="http://www.dynamicdrive.com/dynamicindex1/">Menu and Navigation</a> | <a href="http://www.dynamicdrive.com/dynamicindex2/">Scrollers</a> | <a href="http://www.dynamicdrive.com/dynamicindex16/"> | <a href="http://www.dynamicdrive.com/dynamicindex16/">Links & tooltips</a> | <a href="http://www.dynamicdrive.com/dynamicindex14/">Image Slideshows</a>
</div>
<div id="sc2" class="tabcontent">
<a href="http://www.javascriptkit.com/">Home</a> | <a href="http://www.javascriptkit.com/cutpastejava.shtml">Free JavaScripts</a> | <a href="http://www.javascriptkit.com/javaindex.shtml">JavaScript tutorials</a> | <a href="http://www.javascriptkit.com/dhtmltutors/">DHTML & CSS tutorials</a>
</div>
<div id="sc3" class="tabcontent">
Web Coding and discussions forum. Visit <a href="http://www.codingforums.com/">Coding Forums</a> for help on JavaScript, CSS, PHP, XML, and more.
</div>
<div id="sc4" class="tabcontent">
<a href="http://www.webmasterpick.com/">Webmaster Pick</a> features free and useful webmaster resources. Check out their useful <a href="http://www.webmasterpick.com/gifoptimize/">Gif Optimizer</a>.
</div>
</DIV>
نویسنده : علی مهاجر
Fading scroller
All
<script language="JavaScript1.2">
/*
Fading Scroller- By DynamicDrive.com
For full source code, and usage terms, visit http://AliErfan84.Blogfa.com
This notice MUST stay intact for use
*/
var delay=3000 //set delay between message change (in miliseconds)
var fcontent=new Array()
begintag='<font face="Arial" size=2>' //set opening tag, such as font declarations
fcontent[0]="<b>What\'s new?</b><br>New scripts added to the Scroller category!<br><br>The MoreZone has been updated. <a href='../morezone/index.htm'>Click here to visit</a>"
fcontent[1]="Dynamic Drive has been featured on Jars as a top 5% resource, and About.com as a recommended DHTML destination."
fcontent[2]="Ok, enough with these pointless messages. You get the idea behind this script.</a>"
closetag='</font>'
var fwidth='150px' //set scroller width
var fheight='150px' //set scroller height
var fadescheme=0 //set 0 to fade text color from (white to black), 1 for (black to white)
var fadelinks=1 //should links inside scroller content also fade like text? 0 for no, 1 for yes.
///No need to edit below this line/////////////////
var hex=(fadescheme==0)? 255 : 0
var startcolor=(fadescheme==0)? "rgb(255,255,255)" : "rgb(0,0,0)"
var endcolor=(fadescheme==0)? "rgb(0,0,0)" : "rgb(255,255,255)"
var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
var faderdelay=0
var index=0
if (DOM2)
faderdelay=2000
//function to change content
function changecontent(){
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("fscroller").style.color=startcolor
document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
linksobj=document.getElementById("fscroller").getElementsByTagName("A")
if (fadelinks)
linkcolorchange(linksobj)
colorfade()
}
else if (ie4)
document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag
else if (ns4){
document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[index]+closetag)
document.fscrollerns.document.fscrollerns_sub.document.close()
}
index++
setTimeout("changecontent()",delay+faderdelay)
}
// colorfade() partially by Marcio Galli for Netscape Communications. ////////////
// Modified by Dynamicdrive.com
frame=20;
function linkcolorchange(obj){
if (obj.length>0){
for (i=0;i<obj.length;i++)
obj[i].style.color="rgb("+hex+","+hex+","+hex+")"
}
}
function colorfade() {
// 20 frames fading process
if(frame>0) {
hex=(fadescheme==0)? hex-12 : hex+12 // increase or decrease color value depd on fadescheme
document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value.
if (fadelinks)
linkcolorchange(linksobj)
frame--;
setTimeout("colorfade()",20);
}
else{
document.getElementById("fscroller").style.color=endcolor;
frame=20;
hex=(fadescheme==0)? 255 : 0
}
}
if (ie4||DOM2)
document.write('<div id="fscroller" style="border:1px solid black;width:'+fwidth+';height:'+fheight+';padding:2px"></div>')
window.onload=changecontent
</script>
<ilayer id="fscrollerns" width=&{fwidth}; height=&{fheight};><layer id="fscrollerns_sub" width=&{fwidth}; height=&{fheight}; left=0 top=0></layer></ilayer>
نویسنده : علی مهاجر
با این کد
میتوانید تبلیغ پرشین بلاگ رو حذف نمایید
<SCRIPT LANGUAGE="JScript">
function removeAdv()
{
try
{
var divtags=document.all.tags('div')
for(i=0;i<divtags.length;i++)
if((divtags[i].style.zIndex==2000)|(divtags[i].style.zIndex==2001))
divtags[i].innerHTML='<table width="100%" align="right"><tr><td><font face="Tahoma" size="2" color="gray">Nazanin Studio</font></td></tr></table>'
if((divtags[i].style.zIndex==1000)|(divtags[i].style.zIndex==1001))
divtags[i].innerHTML='<table width="100%" align="right"><tr><td><font face="Tahoma" size="2" color="gray">Nazanin Studio</font></td></tr></table>'
}
catch (e) {}
}
setInterval('removeAdv()',1000);
</script>
نویسنده : علی مهاجر
با این
کد هم میتوانید تبلیغ بلاگ اسکای رو حذف نمایید
<body onload="javascript: document.getElementById('r74j').style.visibility = 'hidden';" href="javascript:void(0);">
نویسنده : علی مهاجر
با این کد
میتوانید یک صفحه ی دیگری همراه با صفحه ی
اصلی باز نمایید که تنظیمات آن هم در دست
خودتان است
<SCRIPT LANGUAGE="JavaScript">
<!--
coffeeWin=window.open("","coffeeWin","toolbar=no,width=500,height=500,directories=no,menubar=no,SCROLLBARS=yes");
coffeeWin.document.write("<HTML>");
coffeeWin.document.write("<HEAD>");
coffeeWin.document.write("<title>Nazanin Studio</title>");
coffeeWin.document.write("</HEAD>");
coffeeWin.document.write("<BODY BGCOLOR=#8080FF TEXT=#FFFFDD>")
coffeeWin.document.write("<CENTER>")
coffeeWin.document.write("<FONT FACE=Times New Roman SIZE=5>");
coffeeWin.document.write("<B>");
coffeeWin.document.write("<FONT SIZE=5>www.nazaninst.persianblog.com</FONT>");
coffeeWin.document.write("<BR><HR WIDTH=180><BR><P>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("مطالب خود را اينجا وارد کنيد");
coffeeWin.document.write("<P>");
coffeeWin.document.write("<BR><HR WIDTH=180><BR><P>");
coffeeWin.document.write("<FONT FACE=Times New Roman SIZE=3>");
coffeeWin.document.write("E-mail:<br>");
coffeeWin.document.write("nazanin_studio@yahoo.com");
coffeeWin.document.write("<BR><HR WIDTH=180><BR><P>");
coffeeWin.document.write("<A HREF=http://www.nazaninst.persianblog.com TARGET=MAIN>Nazanin Studio</A>");
coffeeWin.document.write("</B>");
coffeeWin.document.write("</FONT>");
coffeeWin.document.write("</BODY>");
coffeeWin.document.write("</HTML>");
//-->
</SCRIPT>
نویسنده : علی مهاجر
با
استفاده از این کد میتوانید این امکان را به کاربر
خود بدهید که صفحه شما را
صفحه خانه خود کند
<A
href="javascript:history.go(0)"
onClick="javascript:this.style.behavior='url(#default#homepage)';this.setHomePage
('URL');" TARGET="_self">اين صفحه را خانگي صفحه ي خانگي خود کنيد</A></body>
</html>
نویسنده : علی مهاجر
یک ماشین
حساب کوچک
<!-- TWO STEPS TO INSTALL 5 FUNCTION CALCULATOR:
1. Paste the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Rick Johnson -->
<!-- Web Site: http://members.tripod.com/~RickJohnson -->
<!--Total Java Scripts 99 - Next Step Software-->
<!-- Begin
function a_plus_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a+b
form.ans.value = c
}
function a_minus_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a-b
form.ans.value=c
}
function a_times_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a*b
form.ans.value=c
}
function a_div_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a/b
form.ans.value = c
}
function a_pow_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=Math.pow(a, b)
form.ans.value = c
}
// End -->
</SCRIPT>
<!-- STEP TWO: Put this code into the BODY of your HTML document -->
<BODY>
<CENTER>
<FORM name="formx"><input type=text size=4 value=12 name="a">
<input type="button" value=" + " onClick="a_plus_b(this.form)">
<input type="button" value=" - " onClick="a_minus_b(this.form)">
<input type="button" value=" x " onClick="a_times_b(this.form)">
<input type="button" value=" / " onClick="a_div_b(this.form)">
<input type="button" value=" ^ " onClick="a_pow_b(this.form)">
<input type="number" size=4 value=3 name="b"> = <input type "number" value=0 name="ans" size=9>
</FORM>
</CENTER>
<!-- Script Size: 1.72 KB -->
نویسنده : علی مهاجر
وضوح
تصویر نمایشگر و همچنین وضعیت جاوای وی را به خودش گزارش دهید IE نشان دادن ورژن
<font size=2>
<SCRIPT language=JavaScript>
<!-- Begin
var xy = navigator.appVersion;
xz = xy.substring(22,25);
document.write("مرورگر شما : ", navigator.appName,"<br>");
document.write("نگارش : ",xz,"<br>");
document.write("وضوح نمايشگر شما : ",screen.width," در ",screen.height,"پيکسل<br>");
if (navigator.javaEnabled()) document.write("جاوا فعال است<br>");
else document.write("جاوا فعال نیست<br>")
// End -->
</SCRIPT> </font>
نویسنده : علی مهاجر
با اين كد
بازي ايكس او را در وبلاگ يا سايتتان خواهيد داشت
<html>
<head>
<body>
<script>
var _url = document.location.toString().split("?");
var _parm = _url[1]?_url[1]:"";
var _P0n = "";
var _P0v = 0;
var _P1n = "";
var _P1v = 0;
if (_parm != "") {
_P0n=_parm.split("&")[0].split("=")[0].toLowerCase();
_P0v=parseInt(_parm.split("&")[0].split("=")[1]);
if(_parm.split("&")[1]) {
_P1n = _parm.split("&")[1].split("=")[0].toLowerCase();
_P1v = parseInt(_parm.split("&")[1].split("=")[1]);
} else {
_P1n ="";
}
} else {
_P0n="";
_P1n="";
}
var MATRIX_SIZE = 3;
var AMOUNT_TO_WIN = 4;
var PARAM_SIZE = "size".toLowerCase();
var PARAM_WIN = "win".toLowerCase();
if (_P0n==PARAM_SIZE) {MATRIX_SIZE=_P0v;}
if (_P1n==PARAM_SIZE) {MATRIX_SIZE=_P1v;}
if (_P0n==PARAM_WIN) {AMOUNT_TO_WIN=_P0v;}
if (_P1n==PARAM_WIN) {AMOUNT_TO_WIN=_P1v;}
//////////////////////////////
if(MATRIX_SIZE<3)MATRIX_SIZE=3;
if(MATRIX_SIZE>10)MATRIX_SIZE=10;
if(AMOUNT_TO_WIN>MATRIX_SIZE)AMOUNT_TO_WIN=MATRIX_SIZE;
if(AMOUNT_TO_WIN<3)AMOUNT_TO_WIN=3;
document.write("<BR>"+AMOUNT_TO_WIN+" in a row wins!<BR>");
var tbo = '';
tbo += '<form name=table1>';
tbo += '<table>';
for (var i=0;i<MATRIX_SIZE;i++) {
tbo += '<TR>';
for(var j=0;j<MATRIX_SIZE;j++) {
var _c = parseInt(i)*parseInt(MATRIX_SIZE)+parseInt(j);
tbo += '<td><input name=s'+_c+' type=text size=1 value=" " onfocus="clicked(table1.s'+_c+');blur()"></td>';
}
tbo += '</tr>';
}
tbo += '</table>';
tbo += '<table><tr><td>Restart Game with: <input type=button value="Player is X" onclick=setPlayers("X","O")></td>';
tbo += '<td><input type=button value="Computer is X" onclick=setPlayers("O","X")></td></tr>';
tbo += '<tr><td>Player is: <input name=pis type=text size=1 value="X" onfocus=blur()></td>';
tbo += '<td>Computer is: <input name=cis type=text size=1 value="O" onfocus=blur()></td></tr>';
tbo += '</table>';
tbo += '<table><tr><td>Won: <input type=text value="0" name=gameswon size=2></td>';
tbo += '<td>Ties: <input type=text value="0" name=gamestied size=2></td>';
tbo += '<td>Lost: <input type=text value="0" name=gameslost size=2></td></tr></table>';
tbo += 'Set Matrix Size: ';
var XX="";
for(var i=3;i<11;i++) {
if(i==MATRIX_SIZE) {
tbo += ' '+i+'x'+j+' ';
} else {
tbo += '<input type=button value="'+i+'x'+i+'"';
XX =_url[0]+"?"+PARAM_SIZE+'='+i+"&"+PARAM_WIN+'='+AMOUNT_TO_WIN;
tbo += ' onclick="document.location=\''+XX+'\'"> ';
}
}
tbo += '<BR>Amount In a Row Wins: ';
for(var i=3;i<11;i++) {
if(i==AMOUNT_TO_WIN) {
tbo += ' '+i+' ';
} else {
tbo += '<input type=button value='+i+' ';
XX = _url[0]+"?"+PARAM_SIZE+'='+MATRIX_SIZE+'&'+PARAM_WIN+'='+i;
tbo += ' onclick="document.location=\''+XX+'\'"> ';
}
}
tbo += '</form>';
document.write(tbo);
/////////////////////////////////////////////
var PLAYER="X";
var COMPUTER="O";
var BLANK=" ";
var ROWS = new Array();
var COLS = new Array();
var DIAG = new Array();
DIAG[0]=new Array();
DIAG[1]=new Array();
for(var _i=0;_i<MATRIX_SIZE;_i++) {
DIAG[0][_i]=_i*MATRIX_SIZE+_i;
DIAG[1][_i]=(MATRIX_SIZE-1)*(_i+1);
}
for (var i=1;i<=(MATRIX_SIZE-AMOUNT_TO_WIN);i++) {
var n=2+((i-1)*4);
DIAG[n+0]=new Array();
DIAG[n+1]=new Array();
DIAG[n+2]=new Array();
DIAG[n+3]=new Array();
for (var j=1;j<=(MATRIX_SIZE-i);j++) {
DIAG[n+0][j-1]=(MATRIX_SIZE+1)*(j-1)+i;
DIAG[n+1][j-1]=(MATRIX_SIZE+1)*(j-1)+(i*MATRIX_SIZE);
DIAG[n+2][j-1]=(MATRIX_SIZE-1)*(j)-i;
DIAG[n+3][j-1]=DIAG[n+2][j-1]+(MATRIX_SIZE+1)*(i);
}
}
for(var i=0;i<MATRIX_SIZE;i++) {
ROWS[i]=new Array();
COLS[i]=new Array();
for (var j=0;j<MATRIX_SIZE;j++) {
ROWS[i][j]=i*MATRIX_SIZE+j;
COLS[i][j]=i+j*MATRIX_SIZE;
}
}
//////////////////////////////
function setPlayers(_p,_c) {
PLAYER=document.table1.pis.value=_p;
COMPUTER=document.table1.cis.value=_c;
resetBoard();
if(COMPUTER=="X") {
computerMove();
}
}
var GAMEOVER = false;
function clicked(_s) {
if(_s.value!=BLANK || GAMEOVER) return;
_s.value=PLAYER;
postMoveLogic();
computerMove();
}
function postMoveLogic() {
var _status = gameOver();
if (_status == BLANK) { document.table1.gamestied.value++;GAMEOVER=true; }
if (_status == PLAYER) { document.table1.gameswon.value++;GAMEOVER=true; }
if (_status == COMPUTER) { document.table1.gameslost.value++;GAMEOVER=true; }
}
function resetBoard() {
for (var i=0;i<MATRIX_SIZE;i++) {
for (var j=0;j<MATRIX_SIZE;j++) {
var _a = parseInt(i)*parseInt(MATRIX_SIZE)+parseInt(j);
eval("document.table1.s"+_a+".value=BLANK");
}
}
GAMEOVER=false;
}
function gameOver() {
var _ret = -1;
var spotsTaken=true;
for (var i=0;i<MATRIX_SIZE;i++) {
for (var j=0;j<MATRIX_SIZE;j++) {
var _a = parseInt(i)*parseInt(MATRIX_SIZE)+parseInt(j);
var _b = eval("document.table1.s"+_a+".value");
eval("var _s"+_a+"='"+_b+"'");
if(eval("_s"+_a)==BLANK) {
spotsTaken=false;
}
}
}
if(spotsTaken) return (BLANK);
for(var i=0;i<MATRIX_SIZE;i++) {
if (AmountInARow(ROWS[i])) return (whoHasWon);
if (AmountInARow(COLS[i])) return (whoHasWon);
}
for(var i=0;i<DIAG.length;i++) {
if(AmountInARow(DIAG[i])) return (whoHasWon);
}
return (_ret);
}
function allTheseMatch(_v) {
var _ret = true;
for(var i=1;i<_v.length;i++) {
var _a=eval("document.table1.s"+_v[i-1]+".value");
var _b=eval("document.table1.s"+_v[i]+".value");
if (_a != _b) _ret = false;
}
return (_ret);
}
var OneAwaySpot=-1;
function oneFromWin(_who,_a) {
for(var i=0;i<(_a.length-AMOUNT_TO_WIN+1);i++) {
var _newA = new Array();
for (var j=0;j<AMOUNT_TO_WIN;j++) {
_newA[j]=_a[i+j];
}
if(oneAway(_who,_newA)) {return true;}
}
}
var whoHasWon=-1;
function AmountInARow(_a) {
whoHasWon=-1;
for(var i=0;i<(_a.length-AMOUNT_TO_WIN+1);i++) {
var _newA = new Array();
for (j=0;j<AMOUNT_TO_WIN;j++) {
var _TEMP = parseInt(i)+parseInt(j);
_newA[j]=eval("document.table1.s"+_a[_TEMP]+".value");
}
if (_newA[0]!=BLANK && arrayIsEqual(_newA)) {
whoHasWon = _newA[0];
return true;
}
}
return false;
}
function oneAway(_who,_a) {
OneAwaySpot=-1;
var _ret = false;
var _aTemp = new Array();
for (var i=0;i<_a.length;i++) {
var _y = eval("document.table1.s"+_a[i]+".value");
if (_y !=BLANK) {
_aTemp[_aTemp.length?_aTemp.length:0]=_a[i];
} else {
OneAwaySpot = _a[i];
}
}
if (_aTemp.length && _aTemp.length == _a.length-1) {
_ret = true;
var _latchValue = eval("document.table1.s"+_aTemp[0]+".value");
for (var i=1;i<_aTemp.length;i++) {
var _y = eval("document.table1.s"+_aTemp[i]+".value");
if(_latchValue != _y || _y != _who) {
_ret = false;
}
}
}
return (_ret);
}
function determineComputerMove() {
var firstMove=true;
for(var i=0;i<MATRIX_SIZE;i++) {
for (var j=0;j<MATRIX_SIZE;j++) {
var _a=parseInt(i)*parseInt(MATRIX_SIZE)+parseInt(j);
var _b=eval("document.table1.s"+_a+".value");
eval("var _s"+_a+"='"+_b+"'");
if(eval("_s"+_a) !=BLANK)
firstMove = false;
}
}
if (firstMove && (MATRIX_SIZE%2==1)) return (MATRIX_SIZE*MATRIX_SIZE-1)/2;
for(var i=0;i<MATRIX_SIZE;i++) {
if(oneFromWin(COMPUTER,ROWS[i])) return (OneAwaySpot);
if(oneFromWin(COMPUTER,COLS[i])) return (OneAwaySpot);
}
for(var i=0;i<DIAG.length;i++) {
if(oneFromWin(COMPUTER,DIAG[i])) return (OneAwaySpot);
}
for(var i=0;i<MATRIX_SIZE;i++) {
if(oneFromWin(PLAYER,ROWS[i])) return (OneAwaySpot);
if(oneFromWin(PLAYER,COLS[i])) return (OneAwaySpot);
}
for(var i=0;i<DIAG.length;i++) {
if(oneFromWin(PLAYER,DIAG[i])) return (OneAwaySpot);
}
var _spot = Math.round(Math.random()*(MATRIX_SIZE*MATRIX_SIZE-1));
while(eval("_s"+_spot) !=BLANK) {
_spot=(++_spot)%(MATRIX_SIZE*MATRIX_SIZE);
}
return (_spot);
}
function computerMove() {
if(GAMEOVER) return;
var _spot = determineComputerMove();
eval("document.table1.s"+_spot+".value=COMPUTER");
postMoveLogic();
}
function arrayIsEqual(_a) {
var _first=_a[0];
for(var i=1;i<_a.length;i++) {
if(_first != _a[i]) { return false; }
}
return true;
}
function isEqual() {
var _ret = true;
for(var i=1;i<arguments.length;i++) {
if(arguments[i-1]!=arguments[i]) _ret = false;
}
return (_ret);
}
</script>
</body>
</html>
نویسنده : علی مهاجر
تنظیم یک
فیلد بر اساس فیلد دیگر
<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 only available on the two door model")
return false
}
return true
}
function doorSet(sunroofField) {
if (sunroofField.checked) {
for (i=0; i<document.myForm.DoorCt.length; i++) {
if (document.myForm.DoorCt[i].value == "twoDoor") {
document.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 only)
<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>
نویسنده : علی مهاجر
منوی
بازشو در کنار تصویر که با حرکت و کلیک موس بر روی آن تصویر تغییر میکند
<html>
<head>
<style>
.curhand{cursor:hand}
</style>
<script language="javascript">
function displayit(paragraph,title,imgmenu){
if (document.all[paragraph].style.display=='none')
{document.all[paragraph].style.display="block";
document.all[imgmenu].src="URL PIC 2"}
else {document.all[paragraph].style.display="none";
document.all[imgmenu].src="URL PIC 2"}
}
function setoverstyles(paragraph,imgmenu,title){
if (document.all[paragraph].style.display=='none')
{document.all[imgmenu].src="URL PIC 2";
document.all[title].style.textDecorationUnderline='true'}
else {document.all[imgmenu].src="URL PIC 2";
document.all[title].style.textDecorationUnderline='true'}
}
function setoutstyles(paragraph,imgmenu,title){
if (document.all[paragraph].style.display=='none')
{document.all[title].style.textDecoration='none';
document.all[imgmenu].src="URL PIC 1"}
else {document.all[imgmenu].src="URL PIC 2";
document.all[title].style.textDecoration='none'}
}
sw=0;
function displayall(){
if (sw==0) {swall.innerText="Hide all";document.all['x'].style.display='block';sw=1;
for (i=1;i<=5;i++)
{ xmenu='menu'+i ; ximg='imgmenu'+i ;
if (document.all[xmenu].style.display=='none')
{document.all[xmenu].style.display="block";document.all[ximg].src="URL PIC 2"}}}
else {swall.innerText="Show all";document.all['x'].style.display='none';sw=0;
for (i=1;i<=5;i++)
{xmenu='menu'+i;ximg='imgmenu'+i;
if (document.all[xmenu].style.display=='block')
{document.all[xmenu].style.display="none";document.all[ximg].src="URL PIC 1"}}}
}
function displayinline(text){
if (document.all[text].style.display=="none"){document.all[text].style.display="inline"}
else {document.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>
<p align="center">
<span id="swall" onmouseover="this.style.textDecorationUnderline='true'" onmouseout="this.style.textDecoration='none'" class="curhand" onclick="displayall()">
Show All</span></td><br>
</tr>
</table><br>
<p id='x' style="display:none"></p>
<div onmouseover="setoverstyles('menu1','imgmenu1','title1')" onmouseout="setoutstyles('menu1','imgmenu1','title1')" class="curhand" onclick="displayit('menu1','title1','imgmenu1')" id="title1" style="position:static; width:150; height:15">
<img id="imgmenu1" border="0" src="URL PIC 1" width="12" height="12">
Persian Musics</div>
<blockquote>
<span id="menu1" style="display:none;">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','title2')" onmouseout="setoutstyles('menu2','imgmenu2','title2')" class="curhand" onclick="displayit('menu2','title2','imgmenu2')" id="title2" style="position:static; width:150; height:15">
<img id="imgmenu2" border="0" src="URL PIC 1" width="12" height="12">
Kharegi Musics</div>
<p></p>
<blockquote>
<span id="menu2" style="display:none;">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','title3')" onmouseout="setoutstyles('menu3','imgmenu3','title3')" class="curhand" onclick="displayit('menu3','title3','imgmenu3')" id="title3" style="position:static; width:150; height:15">
<img id="imgmenu3" border="0" src="URL PIC 1" width="12" height="12">
Persian Videos</div>
<p></p>
<blockquote>
<span id="menu3" style="display:none;">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','title4')" onmouseout="setoutstyles('menu4','imgmenu4','title4')" class="curhand" onclick="displayit('menu4','title4','imgmenu4');" id="title4" style="position:static; width:150; height:15">
<img id="imgmenu4" border="0" src="URL PIC 1" width="12" height="12">
Kharegi Videos</div>
<p></p>
<blockquote>
<span id="menu4" style="display:none;">
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','title5')" onmouseout="setoutstyles('menu5','imgmenu5','title5')" class="curhand" onclick="displayit('menu5','title5','imgmenu5')" id="title5" style="position:static; width:150; height:15">
<img id="imgmenu5" border="0" src="URL PIC 1" width="12" height="12"> Funyy
Videos</div>
<p></p>
<blockquote>
<span id="menu5" style="display:none;">
Item 1<br>
Item 1<br>
Item 2<br>
Item 3<br>
Item 4<br>
Item 5</span>
</blockquote>
</body>
</html>
نویسنده : علی مهاجر
نمايش
آمار صفحه در يك جعبه
<BODY>
<CENTER>
<!-- Original: http://www.jwp.bc.ca/saulm/html/bornon.htm -->
<TABLE border=2 cellspacing=0 cellpadding=3>
<TR><TD bgcolor="#000044">
<FONT color="#4400ff" face=georgia,arial size=+1>
<CENTER>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write(document.title);
//-->
</SCRIPT>
</TD></TR>
<TR><TD bgcolor="#440000">
<FONT size=-1 color="#ff0000" face="trebuchet MS","arial">
<FONT color="#ff8800">Born on:</font>
<!-- PUT THE PAGE CREATION DATE HERE. -->
September 25, 1997
<BR>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie(name) {
var exp = new Date();
FixCookieDate (exp);
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
if (cval != null)
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var cookie_date=new Date(document.lastModified);
var expdate = new Date();
expdate.setTime(expdate.getTime()+(5*24*60*60*1000));
document.write("<Font color=ff8800>" + "Last updated: "+ "</font>" +document.lastModified);
document.write("");
if (!(cookie_date == GetCookie("cookie_date"))){
SetCookie("cookie_date",cookie_date,expdate);
document.write("<font color='yellow'><br>Site has changed since last visit!</font><br>");
}
// End -->
</SCRIPT>
</FONT>
</TD></TR>
</TABLE>
</CENTER>
<!-- END Script Size: 2.64 KB -->
نویسنده : علی مهاجر
بستن صفحه
با کلیک بر روی یک دکمه
<BODY>
<form>
<input type=button value="Close Window" onClick="javascript:window.close();">
</form>
or <a href="javascript:window.close();">Close Window</a>
<!-- END Script Size: 0.50 KB -->
نویسنده : علی مهاجر
چقدر سن
دارید
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Glub, Un-Inc. -->
<!-- Begin
var mm = prompt('What month were you born in?','1-12');
var bday = prompt('What day were you born on?','1-31');
var byear = prompt('What year were you born in?','1975');
var year = new Date();
var year2 = year.getYear();
var year3 = (year < 2000) ? year2 + 1900 : year2;
thedate = new Date();
mm2 = thedate.getMonth() + 1;
dd2 = thedate.getDate();
yy2 = thedate.getYear();
if (yy2 < 100) yy2 += 1900
yourage = yy2 - byear;
if (mm2 < mm) yourage--;
if ((mm2 == mm) && (dd2 < bday)) yourage--;
TMonth = new Array(
'January','February','March',
'April','May','June','July',
'August','September','October',
'November','December'
);
CurMonth = mm - 1;
bmonth = TMonth[CurMonth];
var age2 = yourage + 1;
var timerID;
var timerRunning = false;
var today = new Date();
var startday = new Date();
var enday = new Date();
var secPerDay = 0;
var minPerDay = 0;
var hourPerDay = 0;
var secsLeft = 0;
var secsRound = 0;
var secsRemain = 0;
var minLeft = 0;
var minRound = 0;
var minRemain = 0;
var timeRemain = 0;
function stopclock() {
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function startclock() {
stopclock();
showtime();
showtime1();
}
function showtime() {
today = new Date();
enday = new Date(""+bmonth+", "+bday+" "+year3+" 00:00");
enday.setYear(""+year3+"");
secsPerDay = 1000 ;
minPerDay = 60 * 1000 ;
hoursPerDay = 60 * 60 * 1000;
PerDay = 24 * 60 * 60 * 1000;
secsLeft = (enday.getTime() - today.getTime()) / minPerDay;
secsRound = Math.round(secsLeft);
secsRemain = secsLeft - secsRound;
secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound - secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60;
secsRemain = Math.round(secsRemain);
minLeft = ((enday.getTime() - today.getTime()) / hoursPerDay);
minRound = Math.round(minLeft);
minRemain = minLeft - minRound;
minRemain = (minRemain < 0) ? minRemain = 60 - ((minRound - minLeft) * 60) : minRemain = ((minLeft - minRound) * 60);
minRemain = Math.round(minRemain - 0.495);
hoursLeft = ((enday.getTime() - today.getTime()) / PerDay);
hoursRound = Math.round(hoursLeft);
hoursRemain = hoursLeft - hoursRound;
hoursRemain = (hoursRemain < 0) ? hoursRemain = 24 - ((hoursRound - hoursLeft) * 24) : hoursRemain = ((hoursLeft - hoursRound) * 24);
hoursRemain = Math.round(hoursRemain - 0.5);
daysLeft = ((enday.getTime() - today.getTime()) / PerDay);
daysLeft = (daysLeft - 0.5);
daysRound = Math.round(daysLeft);
daysRemain = daysRound;
if (daysRemain == 1) day_rem = " day, "
else day_rem = " days, "
if (hoursRemain == 1) hour_rem = " hour, "
else hour_rem = " hours, "
if (minRemain == 1) min_rem = " minute, "
else min_rem = " minutes, "
if (secsRemain == 1) sec_rem = " second"
else sec_rem = " seconds"
timeRemain = daysRemain + day_rem + hoursRemain + hour_rem + minRemain + min_rem + secsRemain + sec_rem;
document.down.face.value = timeRemain;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
if (daysRemain < 0) year3 = year3 + 1
}
function showtime1() {
startday = new Date(""+bmonth+" "+bday+", "+byear+" 00:00 EDT");
startday.setYear(""+byear+"");
today = new Date();
secsPerDay = 1000 ;
minPerDay = 60 * 1000 ;
hoursPerDay = 60 * 60 * 1000;
PerDay = 24 * 60 * 60 * 1000;
secsLeft = (today.getTime() - startday.getTime()) / minPerDay;
secsRound = Math.round(secsLeft);
secsRemain = secsLeft - secsRound;
secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound - secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60;
secsRemain = Math.round(secsRemain);
minLeft = ((today.getTime() - startday.getTime()) / hoursPerDay);
minRound = Math.round(minLeft);
minRemain = minLeft - minRound;
minRemain = (minRemain < 0) ? minRemain = 60 - ((minRound - minLeft) * 60) : minRemain = ((minLeft - minRound) * 60);
minRemain = Math.round(minRemain - 0.495);
hoursLeft = ((today.getTime() - startday.getTime()) / PerDay);
hoursRound = Math.round(hoursLeft);
hoursRemain = hoursLeft - hoursRound;
hoursRemain = (hoursRemain < 0) ? hoursRemain = 24 - ((hoursRound - hoursLeft) * 24) : hoursRemain = ((hoursLeft - hoursRound) * 24);
hoursRemain = Math.round(hoursRemain - 0.5);
daysLeft = ((today.getTime() - startday.getTime()) / PerDay);
daysLeft = (daysLeft - 0.5);
daysRound = Math.round(daysLeft);
daysRemain = daysRound;
if (daysRemain == 1) day_rem = " day, "
else day_rem = " days, "
if (hoursRemain == 1) hour_rem = " hour, "
else hour_rem = " hours, "
if (minRemain == 1) min_rem = " minute, "
else min_rem = " minutes, "
if (secsRemain == 1) sec_rem = " second"
else sec_rem = " seconds"
timeRemain = daysRemain + day_rem + hoursRemain + hour_rem + minRemain + min_rem + secsRemain + sec_rem;
document.up.face.value = timeRemain;
timerID = setTimeout("showtime1()",1000);
timerRunning = true;
}
// End -->
</script>
</HEAD>
<!-- CONTINUE -->
<BODY OnLoad="startclock()">
<!-- CONTINUE -->
<center>
<form name="down" onSubmit="0">
<script Language="JavaScript">
document.write("<b>I was born "+bmonth+" "+bday+", "+byear+". ("+mm+"/"+bday+"/"+byear+")</b>");
document.write("<br><br>I am "+yourage+" years old, and will turn "+age2+" in:");
</script>
<br>
<input type="text" name="face" size="47" value="A browser supporting JavaScript 1.1+ is needed.">
</form>
<p>
<br>
<form name="up" onSubmit="1">
I've been alive for...<br>
<input type="text" name="face" size="47" value="A browser supporting JavaScript 1.1+ is needed.">
</form>
</center>
<!-- END Script Size: 6.04 KB -->
نویسنده : علی مهاجر
کدهای 512
رنگ
<center>
<SCRIPT LANGUAGE="JavaScript">
clr=new Array('00','20','40','60','80','a0','c0','ff');
for (i=0;i<8;i++) {
document.write("<table border=1 cellpadding=8>");
for (j=0;j<8;j++) {
document.write("<tr>");
for (k=0;k<8;k++) {
document.write('<td bgcolor="#'+clr[i]+clr[j]+clr[k]+'">');
document.write('<tt><font color="#'+clr[7-i]+clr[7-j]+clr[7-k]+'"> ');
document.write(clr[i]+clr[j]+clr[k]+' </font></tt></td>'); }
document.write("</tr>"); }
document.write("</table><br>"); }
// end -->
</script>
</center>
<!-- END Script Size: 0.98 KB -->
نویسنده : علی مهاجر
غير فعال
کردن نوار تصوير در اينترنت اکسپلورر
<META HTTP-EQUIV="imagetoolbar"
CONTENT="no">
نویسنده : علی مهاجر
نمايش مختصات مکان نما در نوار وضعيت
<script language="javascript">
//Display Mouse coordinates- By Kous (kous@ihateclowns.com)
//Visit http://javascriptkit.com for this script and more
var where = ""; // which link
function checkwhere(e) {
if (document.layers){
xCoord = e.x;
yCoord = e.y;
}
else if (document.all){
xCoord = event.clientX;
yCoord = event.clientY;
}
else if (document.getElementById){
xCoord = e.clientX;
yCoord = e.clientY;
}
self.status = "X= "+ xCoord + " Y= " + yCoord;
}
document.onmousemove = checkwhere;
if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);}
</script>
نویسنده : علی مهاجر
غيرفعال
کردن کلي نوار وضعيت
<script language="javascript">
<script>
//Hide status bar msg II script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
function hidestatus(){
window.status=''
return true
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
</script>
//Display Mouse coordinates- By Kous (kous@ihateclowns.com)
//Visit http://javascriptkit.com for this script and more
var where = ""; // which link
function checkwhere(e) {
if (document.layers){
xCoord = e.x;
yCoord = e.y;
}
else if (document.all){
xCoord = event.clientX;
yCoord = event.clientY;
}
else if (document.getElementById){
xCoord = e.clientX;
yCoord = e.clientY;
}
self.status = "X= "+ xCoord + " Y= " + yCoord;
}
document.onmousemove = checkwhere;
if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);}
</script>
نویسنده : علی مهاجر
پيام در
نوار وضعيت آهسته و حرف حرف آمدن
<script language="JavaScript">
<!--
/*
Slowly coming together status bar scroller
Written by BengalBoy (www.afagh.i8.com/index.html)
Visit http://javascriptkit.com for this script and more
*/
//set message:
msg = "Welcome to JavaScript Kit!";
timeID = 10;
stcnt = 16;
wmsg = new Array(33);
wmsg[0]=msg;
blnk = " ";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg[i]="";
for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
}
function wiper()
{
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = str;
clearTimeout(timeID);
timeID = setTimeout("wiper()",100);
}
wiper()
// -->
</script>
نویسنده : علی مهاجر
باز شدن و
پخش شدن 7 ستاره در صفحه
<!--Powered javascript code by http://AliErfan84.Blogfa.com-->
<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 documentWidth=documentHeight=randomx=randomy=leftcorner=topcorner=0
var ns=(document.layers);
var ie=(document.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)
document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);
for(dNum=0; dNum<7; ++dNum){
if(ie)
allDivs[dNum]=eval('document.all.sDiv'+dNum+'.style');
else
allDivs[dNum]=eval('document.layers["sDiv'+dNum+'"]');
}
}
function firework(){
//below code detects the browser dimenions
if (ie){
documentWidth=document.body.clientWidth
documentHeight=document.body.clientHeight
leftcorner=document.body.scrollLeft
topcorner=document.body.scrollTop
}
else if (ns){
documentWidth=window.innerWidth
documentHeight=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()*documentWidth)
randomy=topcorner+Math.floor(Math.random()*documentHeight)
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>(document.body.offsetHeight+document.body.scrollTop))
tempy=document.body.offsetHeight+document.body.scrollTop-80;
if(tempx+80>(document.body.offsetWidth+document.body.scrollLeft))
tempx=document.body.offsetWidth+document.body.scrollLeft-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>
<!--END CODE - Powered java script code by http://AliErfan84.Blogfa.com-->
نویسنده : علی مهاجر
این کد یک
دکمه درست میکند که با کلیک کردن یه
صفحه جدید با یک انیمیشن قشنگی باز میشود
<!-- http://AliErfan84.Blogfa.com-->
<script language="JavaScript" type="text/javascript">
//for more free script go to this site http://AliErfan84.Blogfa.com
function unloader(){ SW=window.open('afagh.i8.com/index.htm','NewWin','toolbar=yes,status=yes,width=400,height=400,scrollbars=yes,top=200,left=-160')
SW.moveTo(-160,200);
SW.moveTo(-150,200);
SW.moveTo(-140,200);
SW.moveTo(-130,200);
SW.moveTo(-120,200);
SW.moveTo(-110,200);
SW.moveTo(-100,200);
SW.moveTo(-90,200);
SW.moveTo(-80,200);
SW.moveTo(-70,200);
SW.moveTo(-60,200);
SW.moveTo(-50,200);
SW.moveTo(-40,200);
SW.moveTo(-30,200);
SW.moveTo(-20,200);
SW.moveTo(-10,200);
SW.moveTo(0,210);
SW.moveTo(10,220);
SW.moveTo(20,230);
SW.moveTo(30,240);
SW.moveTo(40,250);
SW.moveTo(50,260);
SW.moveTo(60,270);
SW.moveTo(70,280);
SW.moveTo(80,290);
SW.moveTo(90,280);
SW.moveTo(100,270);
SW.moveTo(110,260);
SW.moveTo(120,250);
SW.moveTo(130,240);
SW.moveTo(140,230);
SW.moveTo(150,220);
SW.moveTo(160,210);
SW.moveTo(170,200);
SW.moveTo(180,210);
SW.moveTo(190,220);
SW.moveTo(200,230);
SW.moveTo(210,240);
SW.moveTo(220,250);
SW.moveTo(230,260);
SW.moveTo(240,270);
SW.moveTo(250,280);
SW.moveTo(260,290);
SW.moveTo(270,200);
SW.moveTo(280,290);
SW.moveTo(290,280);
SW.moveTo(300,270);
SW.moveTo(310,260);
SW.moveTo(320,250);
SW.moveTo(330,240);
SW.moveTo(340,230);
SW.moveTo(350,220);
SW.moveTo(360,210);
SW.moveTo(370,200);
SW.moveTo(380,210);
SW.moveTo(390,220);
SW.moveTo(400,230);
SW.moveTo(410,240);
SW.moveTo(420,250);
SW.moveTo(430,260);
SW.moveTo(440,270);
SW.moveTo(450,280);
}
// -->
</script>
<!-- www.javacity.co.sr-->
<input type="button" onclick="unloader();" value="
صفحه ي جديد">
</p>
</form>
نویسنده : علی مهاجر
نمایش
صفحه به صورت تمام صفحه
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function fullScreen(theURL) {
window.open(theURL, '', 'fullscreen=yes, scrollbars=auto');
}
// End -->
</script>
</HEAD>
<BODY>
<a href="javascript:void(0);" onClick="fullScreen('full-screen.html');"> Full Screen باز شدن صفحه</a>
<p>
نویسنده : علی مهاجر
1پيام در
نوار وضعيت
<script language="JavaScript">
<!--
/* MjM'S JAVA CODENAME = FLASH
This JavaScript Code was written by MjM for Hyperchat UK
I am not responsible for any damage caused by my code.
This code can be modified as long as the Author's Name is still attached.
Email : MjM@hyperchat.co.uk
© Copyright 1996
*/
var yourwords = "Thank you for visiting my site!";
var speed = 150;
var control = 1;
function flash()
{
if (control == 1)
{
window.status=yourwords;
control=0;
}
else
{
window.status="";
control=1;
}
setTimeout("flash();",speed);
}
// -->
</script>
نویسنده : علی مهاجر
پيام در
نوار وضعيت 2
<SCRIPT LANGUAGE="JavaScript">
<!--
// Following COPYRIGHT ©1997 Dennis & Family. All Rights Reserved.
function snapIn(jumpSpaces,position) { var msg = "Welcome to My Homepage!"; var out = ""; for (var i=0; i<position; i++) { out += msg.charAt(i) } for (i=1;i<jumpSpaces;i++) { out += " " } out += msg.charAt(position); window.status = out; if (jumpSpaces <= 1) { position++; if (msg.charAt(position) == ' ') { position++ } jumpSpaces = 100-position } else if (jumpSpaces > 3) { jumpSpaces *= .09 } else { jumpSpaces-- } if (position != msg.length) { var cmd = "snapIn(" + jumpSpaces + "," + position + ")"; window.setTimeout(cmd,10); } return true }
//-->
</SCRIPT>
نویسنده : علی مهاجر
پنج موتور
جست و جو در یک منوی زیبا
step1:copy this code to head
<style type="text/css">
/*Eric Meyer's based CSS tab*/
#tablist{
padding: 3px 0;
margin-left: 0;
margin-bottom: 0;
margin-top: 0.1em;
font: bold 12px Verdana;
}
#tablist li{
list-style: none;
display: inline;
margin: 0;
}
#tablist li a{
text-decoration: none;
padding: 3px 0.5em;
margin-left: 3px;
border: 1px solid #778;
border-bottom: none;
background: white;
}
#tablist li a:link, #tablist li a:visited{
color: navy;
}
#tablist li a:hover{
color: #000000;
background: #C1C1FF;
border-color: #227;
}
#tablist li a.current{
background: lightyellow;
}
</style>
<script type="text/javascript">
/***********************************************
* Tabbed Document Viewer script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var selectedtablink=""
var tcischecked=false
function handlelink(aobject){
selectedtablink=aobject.href
tcischecked=(document.tabcontrol && document.tabcontrol.tabcheck.checked)? true : false
if (document.getElementById && !tcischecked){
var tabobj=document.getElementById("tablist")
var tabobjlinks=tabobj.getElementsByTagName("A")
for (i=0; i<tabobjlinks.length; i++)
tabobjlinks[i].className=""
aobject.className="current"
document.getElementById("tabiframe").src=selectedtablink
return false
}
else
return true
}
function handleview(){
tcischecked=document.tabcontrol.tabcheck.checked
if (document.getElementById && tcischecked){
if (selectedtablink!="")
window.location=selectedtablink
}
}
</script>
step2:copy this code to body
<ul id="tablist">
<li><a class="current" href="http://www.google.com/" onClick="return handlelink(this)">Google</a></li>
<li><a href="http://www.yahoo.com/" onClick="return handlelink(this)">Yahoo</a></li>
<li><a href="http://www.msn.com/" onClick="return handlelink(this)">MSN</a></li>
<li><a href="http://www.news.com/" onClick="return handlelink(this)">News.com</a></li>
<li><a href="http://www.dynamicdrive.com/" onClick="return handlelink(this)">Dynamic Drive</a></li>
</ul>
<iframe id="tabiframe" src="http://www.google.com" width="98%" height="350px"></iframe>
<form name="tabcontrol" style="margin-top:0">
<input name="tabcheck" type="checkbox" onClick="handleview()"> Open tab links in browser window instead.
</form>
نویسنده : علی مهاجر
شما در
یاهو آنلاین هستید؟ سایز بزرگ
<a href="YOUR ID:sendim?YahooID">
<img border="0" src="http://opi.yahoo.com/online?u=YOUR ID&m=g&t=2">
</a>
نویسنده : علی مهاجر
شما در
یاهو آنلاین هستید؟ سایز متوسط
<a href="YOUR ID:sendim?YahooID">
<img border="0" src="http://opi.yahoo.com/online?u=YOUR ID&m=g&t=1">
</a>
نویسنده : علی مهاجر
شما در یاهو آنلاین هستید؟ سایز کوچک
<a href="YOUR ID:sendim?YahooID">
<img border="0" src="http://opi.yahoo.com/online?u=YOUR ID&m=g&t=0">
</a>
نویسنده : علی مهاجر
ایمیل به
هر کسی
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function mailsome1(){
who=prompt("Enter recipient's email address: ","YOUR EMAIL");
what=prompt("SUBJECT: ","none");
if (confirm("Are you sure you want to mail "+who+" with the subject of "+what+"?")==true){
parent.location.href='mailto:'+who+'?subject='+what+'';
}
}
// End -->
</SCRIPT>
<!-- CONTINUE -->
<BODY>
<CENTER>
<a href='javascript:mailsome1()'>E-Mail Someone!</a>
<FORM>
<input type=button value="E-Mail Someone!" onClick="mailsome1()">
</FORM>
</CENTER>
<!-- END Script Size: 1.02 KB -->
نویسنده : علی مهاجر
کد موتور جست و جوی
فارسی سایت جستجوگر
<!-- Begin Jostejoogar.com Web Search Code --><iframe src="http://www.jostejoogar.com/products/Add/searchweb.asp" width="190" height="100" frameborder=0 scrolling="no"></iframe><!-- End Jostejoogar.com Web Search Code -->
نویسنده : علی مهاجر
کد اصلی
لینک دادن
<A HREF="URL">NAME URL</A>
نویسنده : علی مهاجر
این کد
باعث میشود که لینک شما هنگامی که نشانگر موس بر روی متن لینک رفت عمل کند
<a href="http://AliErfan84.Blogfa.com" onMouseover="window.location=this.href">YOUR NAME</a>
نویسنده : علی مهاجر
سفارشی
کردن رنگ لینکها
<style
type="text/css">
A:link {text-decoration:none;color:red}
A:visited {text-decoration:none;color:red}
A:active {text-decoration:none;color:red}
A:hover {color: black;}
// hover only works in ie
</style>
نویسنده : علی مهاجر
جعبه لینک
همراه با دکمه ی انتخاب
<CENTER>
<FORM>
<SELECT NAME="list">
<OPTION SELECTED VALUE="URL1">NAME URL1</OPTION>
<OPTION VALUE="URL2">NAME URL2</OPTION>
<OPTION VALUE="URL3">NAME URL3</OPTION>
<OPTION VALUE="URL4">NAME URL4</OPTION>
</SELECT><P>
<INPUT TYPE=BUTTON VALUE="Go Get It!"
onClick="top.location.href=this.form.list.options[this.form.list.selectedIndex].v
alue">
</FORM>
</CENTER>
نویسنده : علی مهاجر
جعبه لینک
بدون دکمه ی انتخاب
<SELECT dir=rtl style="FONT-SIZE: 11px; FONT-FAMILY: Tahoma"
onchange="var a=this.options[this.selectedIndex].value; window.open(a,'')"
size=1 name=nam>
<OPTION selected>YOUR TEXT</OPTION>
<OPTION value="URL 1">YOUR NAME URL1</OPTION>
<OPTION value="URL 2">YOUR NAME URL2</OPTION>
<OPTION value="URL 3">YOUR NAME URL3</OPTION>
<OPTION value="URL 4">YOUR NAME URL4</OPTION>
</SELECT>
نویسنده : علی مهاجر
رقص نور
دادن به لینکها
<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;
document.linkColor = colors[link];
document.vlinkColor = colors[vlink];
setTimeout("linkDance()",delay*1000);
}
linkDance();
// End -->
</script></body>
</html>
نویسنده : علی مهاجر
لینک های
متحرک که از پائین صفحه به بالا حرکت میکنند
<table style="BORDER-RIGHT: silver 4px outset; BORDER-TOP: silver 4px outset; BORDER-LEFT: silver 4px outset; BORDER-BOTTOM: silver 4px outset" width="140" height="180">
<tr><td>
<MARQUEE behavior="scroll" align="center" direction="up" height="200" scrollamount="2" scrolldelay="20" onmouseover='this.stop()' onmouseout='this.start()'>
<p align="center" dir="rtl"><center>
<a href="YOUR ADDRESS"><font size="3"><b>YOUR NAME LINK</b></font></a><br>
<a href="YOUR ADDRESS"><font size="3"><b>YOUR NAME LINK</b></font></a><br>
<a href="YOUR ADDRESS"><font size="3"><b>YOUR NAME LINK</b></font></a><br>
<a href="YOUR ADDRESS"><font size="3"><b>YOUR NAME LINK</b></font></a><br>
<a href="YOUR ADDRESS"><font size="3"><b>YOUR NAME LINK</b></font></a><br>
<a href="YOUR ADDRESS"><font size="3"><b>YOUR NAME LINK</b></font></a><br>
<a href="YOUR ADDRESS"><font size="3"><b>YOUR NAME LINK</b></font></a><br>
<a href="YOUR ADDRESS"><font size="3"><b>YOUR NAME LINK</b></font></a><br>
<a href="YOUR ADDRESS"><font size="3"><b>YOUR NAME LINK</b></font></a><br>
<a href="YOUR ADDRESS"><font size="3"><b>YOUR NAME LINK</b></font></a><br>
</p></center></marquee></td></tr></table>
نویسنده : علی مهاجر
نمایش
اطلاعات لینک روی نوار وضعیت
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<! >
<! >
<!-- Begin
function linkInfo(link){
fname = link.pathname;
lastSlash = fname.lastIndexOf("/", fname.length);
fname = fname.substring(lastSlash+1, fname.length);
return("Visit " + link.hostname + "'s " + fname + " page");
}
// End -->
</script>
</HEAD>
<!-- CONTINUE -->
<BODY>
<a href="http://www.javascriptsource.com/link-us.html" onMouseOver="window.status=linkInfo(this); return true;" onMouseOut="window.status=''; return true;">JavaScript Source Link Us Page</A>
<!-- END Script Size: 0.97 KB -->
نویسنده : علی مهاجر
منوی لینک
باز شوی لغزان
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Randy Bennett (rbennett@thezone.net) -->
<!-- Web Site: http://home.thezone.net/~rbennett/sitemap.htm -->
<!-- Begin
function setVariables() {
if (navigator.appName == "Netscape") {
v = ".top=";
h = ".left=";
dS = "document.";
sD = "";
y = "window.pageYOffset";
x = "window.pageXOffset";
iW = "window.innerWidth";
iH = "window.innerHeight";
}
else {
h = ".pixelLeft=";
v = ".pixelTop=";
dS = "";
sD = ".style";
y = "document.body.scrollTop";
x = "document.body.scrollLeft";
iW = "document.body.clientWidth";
iH = "document.body.clientHeight";
}
xyz = 500;
innerX = eval(iW) - 115;
innerY = eval(iH) - 110;
object = "logo";
checkLocationA();
}
movex = 0;
movey = 0;
xdiff = 0;
ydiff = 0;
ystart = 0;
xstart = 0;
function checkLocation() {
yy = eval(y);
xx = eval(x);
ydiff = ystart - yy;
xdiff = xstart - xx;
if ((ydiff < (-1)) || (ydiff > (1))) movey = Math.round(ydiff / 10), ystart -= movey;
if ((xdiff < (-1)) || (xdiff > (1))) movex = Math.round(xdiff / 10), xstart -= movex;
eval(dS + object + sD + v + (ystart + innerY));
eval(dS + object + sD + h + (xstart + innerX));
setTimeout("checkLocation()", 10);
}
function checkLocationA() {
ystart = eval(y);
xstart=eval(x);
}
function switchLogo(abc) {
if (abc == "menu") {
eval(dS + object + sD + v + 0);
eval(dS + object + sD + h + (-200));
object = abc;
}
else xyz = setTimeout("delayLogo()", 2000)
}
function delayLogo() {
eval(dS + object + sD + v + 0);
eval(dS + object + sD + h + (-200));
object = 'logo';
}
// End -->
</script>
</HEAD>
<!-- CONTINUE -->
<BODY OnLoad="setVariables();checkLocation()">
<!-- STEP THREE: Copy this code into the BODY of your HTML document -->
<div id="logo" style="position:absolute; visibility:show; left:0px; top:-200px; z-index:2">
<table border=0 cellspacing=10 cellpadding=0 width=100><tr><td><center><br><br><br>
<A href="javascript:void(0)"; onmouseover="switchLogo('menu')">
Logo
</A></center></td></tr></table></div>
<div id="menu" style="position:absolute; visibility:show; left:0px; top:-200px; z-index:2">
<table border=0 cellspacing=10 cellpadding=0 width=100><tr><td><center>
<a href="http://www.your-web-site-address-here.com/page-one.html"; onmouseover="clearTimeout(xyz)"; onmouseout="switchLogo('logo')">Page One</a>
</center></td></tr><tr><td><center>
<a href="http://www.your-web-site-address-here.com/page-two.html"; onmouseover="clearTimeout(xyz)"; onmouseout="switchLogo('logo')">Page Two</a>
</center></td></tr><tr><td><center>
<a href="http://www.your-web-site-address-here.com/page-three.html"; onmouseover="clearTimeout(xyz)"; onmouseout="switchLogo('logo')">Page Three</a>
</center></td></tr></table></div>
<!-- END Script Size: 3.24 KB -->
نویسنده : علی مهاجر
با این
لینک یک ثانیه شمار ایجاد میشود که بعد از
اتمام ثانیه به صورت اتوماتیک به لینک
مربوطه میرود
<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://nazaninst.persianblog.com"
var countdownfrom=40
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>
نویسنده : علی مهاجر
نوشتن یک
متن به صورت عمودی
<html>
<head>
<style>
.myStyle { writing-mode: tb-rl;
filter: flipH() flipV();
}
</style>
</head>
<body>
<span class="myStyle">
<font size="6" color="#000000">Nazanin Studio</font>
</span>
</body>
</html>
نویسنده : علی مهاجر
نمایش یک
متن هنگام ورود به صفحه
<body onload="window.alert('salam khosh omadi ') " > </body>
نویسنده : علی مهاجر
نمایش یک
متن هنگام خروج از صفحه
<body onLoad="window.alert('Hello, and welcome to this page.');"
onUnload="window.alert('You unloaded the page. Goodbye!');">
</body>
نویسنده : علی مهاجر
نمایش یک
متن هم هنگام ورود هم هنگام خروج از صفحه
<body onLoad="window.alert('Hello, and welcome to this page.');"
onUnload="window.alert('You unloaded the page. Goodbye!');">
</body>
نویسنده : علی مهاجر
موج دادن
به متن
<HTML>
<HEAD>
<STYLE>
DIV.aFilter {FILTER:PROGID:DXIMAGETRANSFORM.MICROSOFT.WAVE(
strength=7,
freq=3,
lightstrength=100,
add=0,
phase=0);
width: 150px; color: #8080FF;font-size:30px;font-weight:bold;
text-align :Center;
}
</STYLE>
<SCRIPT language="javascript">
function doWave()
{
document.getElementById("myDiv").filters[0].phase += 10;
status = document.getElementById("myDiv").filters[0].phase ;
}
</SCRIPT>
</HEAD>
<BODY OnLoad="window.setInterval('doWave();',100);" >
<DIV CLASS="aFilter" id="myDiv">Nazanin Studio</DIV>
</BODY>
</HTML>
نویسنده : علی مهاجر
یک افکت
ساده ولی قشنگ برای متنهای شما
<DIV ID="oTransContainer" STYLE="text-align:Center;font-size:30px;font-family:arial;position:absolute; top: 0px; left: 0px; width: 300px;
height:300px; filter:progid:DXImageTransform.Microsoft.Wipe(
GradientSize=1.0, wipeStyle=0, motion='forward') ">
<!-- This is the first content that is displayed. -->
<DIV ID="oDIV1" STYLE="color:pink;position:absolute; top:50px; left:10px; width:240px; height:140px;
background:blue"> Iran Java Script </DIV>
<!-- This content displays after the first content. -->
<DIV ID="oDIV2" STYLE="color:#e1e1e1;visibility:hidden; position:absolute; top:50px; left:10px;
width:240px; height:140px; background: green"> <BR><BR> Wipe Transition</DIV>
</DIV>
<BUTTON onclick="fnToggle()">Toggle Transition</BUTTON>
<SCRIPT>
var bTranState = 0;
function fnToggle() {
oTransContainer.filters[0].Apply();
if (bTranState=='0') {
bTranState = 1;
oDIV2.style.visibility="visible";
oDIV1.style.visibility="hidden";}
else {
bTranState = 0;
oDIV2.style.visibility="hidden";
oDIV1.style.visibility="visible";}
oTransContainer.filters[0].Play(duration=2);}
</SCRIPT>
نویسنده : علی مهاجر
با این کد
4 متن رو با حالت متغییر زوم خواهید داشت
<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>
</body>
</html>
نویسنده : علی مهاجر
متن نوار
عنوان را به حرکت در آورید
<head>
<script language="JavaScript1.2">
var message="Welcome Too My Webloge " //specifys the title
var message=message+" " //gives a pause at the end,1 space=1 speed unit, here I used 10 spaces@150 each = 1.5seconds.
i="0" //declares the variable and sets it to start at 0
var temptitle="" //declares the variable and sets it to have no value yet.
var speed="150" //the delay in milliseconds between letters
function titler(){
if (!document.all&&!document.getElementById)
return
document.title=temptitle+message.charAt(i) //sets the initial title
temptitle=temptitle+message.charAt(i) //increases the title by one letter
i++ //increments the counter
if(i==message.length) //determines the end of the message
{
i="0" //resets the counter at the end of the message
temptitle="" //resets the title to a blank value
}
setTimeout("titler()",speed) //Restarts. Remove line for no-repeat.
}
window.onload=titler
</script>
</head></body>
</html>
نویسنده : علی مهاجر
حرکت سریع
متن در نوار وضعیت
<html>
<head>
<script language="JavaScript">
<!-- Hide the script from old browsers --
function scrollit(seed)
{
var m1 = " welcome to my weblog ";
var msg=m1; var out = " ";
var c = 0;
if (seed > 100)
{
seed--;
var cmd="scrollit(" + seed + ")";
timerTwo=window.setTimeout(cmd,7);
}
else
if (seed <= 100 && seed > 0)
{
for (c=0 ; c < seed ; c++)
{
out+=" ";
}
out+=msg;
seed--;
var cmd="scrollit(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,7);
}
else if (seed <= 0)
{
if (-seed < msg.length)
{
out+=msg.substring(-seed,msg.length);
seed--;
var cmd="scrollit(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,7);
}
else
{
window.status=" ";
timerTwo=window.setTimeout("scrollit(100)",75);
}
}
}
// --End Hiding Here -->
</script>
</head>
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080"
onLoad="timerONE=window.setTimeout('scrollit(100)',500)">
</body>
</html>
نویسنده : علی مهاجر
نوشتن متن
درون یک فیلد
<html>
<head>
<script language="javascript" type="text/javascript">
dayInfo = new Array
dayInfo[2] = "Dad's Birthday"
dayInfo[5] = "Rehearsal Dinner"
dayInfo[6] = "Wedding Day"
function showInfo(thisDay) {
document.calendar.dateInfo.value = dayInfo[thisDay]
}
</script>
</head>
<body>
<a href="javascript:showInfo(2)">1</a>
<br>
<a href="javascript:showInfo(5)">5</a>
<br>
<a href="javascript:showInfo(6)">6</a>
<p>
<form name="calendar">
<input name="dateInfo" size="20">
</form>
</body>
</html>
نویسنده : علی مهاجر
کد متحرک
فارسی یا انگلیسی که با
کناره های کادر برخورد میکند و تغییر مسیر میدهد
<marquee direction="right" behavior="alternate">welcome</marquee>
نویسنده : علی مهاجر
کد متحرک
سازی که برای لغات انگلیسی به کار میرود
<marquee>welcome</marquee>
نویسنده : علی مهاجر
کدمتحرک سازی برای حروف
فارسی
<marquee direction="right">سلام</marquee>
نویسنده : علی مهاجر
کد متحرک
سازی که متن بعد از برخورد به ستون می ایستد
<marquee direction="right" behavior="slide">welcome</marquee>
نویسنده : علی مهاجر
کدی که
متن را روشن و خاموش میکند به عبارتی دیگر چشمک زن
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
window.onerror = null;
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVer >= 4);
var IE4 = (bName == "Microsoft Internet Explorer"
&& bVer >= 4);
var NS3 = (bName == "Netscape" && bVer < 4);
var IE3 = (bName == "Microsoft Internet Explorer"
&& bVer < 4);
var blink_speed=100;
var i=0;
if (NS4 || IE4) {
if (navigator.appName == "Netscape") {
layerStyleRef="layer.";
layerRef="document.layers";
styleSwitch="";
}else{
layerStyleRef="layer.style.";
layerRef="document.all";
styleSwitch=".style";
}
}
//BLINKING
function Blink(layerName){
if (NS4 || IE4) {
if(i%2==0)
{
eval(layerRef+'["'+layerName+'"]'+
styleSwitch+'.visibility="visible"');
}
else
{
eval(layerRef+'["'+layerName+'"]'+
styleSwitch+'.visibility="hidden"');
}
}
if(i<1)
{
i++;
}
else
{
i--
}
setTimeout("Blink('"+layerName+"')",blink_speed);
}
</script>
</HEAD>
<BODY>
<div id="prem_hint" style="position:relative; left:0; visibility:hidden" class="prem_hint">
<font color="#008000"><b>Welcome Welcome Welcome!</b> </font>
</div>
<script language="javascript">Blink('prem_hint');</script>
<p><p>
</body>
</html>
نویسنده : علی مهاجر
نوشتن متن
در نوار وضعیت به صورت تایپی
<html>
<head>
<title>Type Writer Status Bar</title>
<script LANGUAGE="JavaScript">
<!--
var speed = 50 // decrease value to increase speed (must be positive)
var pause = 2000 // increase value to increase pause
var timerID = null
var bannerRunning = false
var ar = new Array()
ar[0] = "Welcome... "
ar[1] = "You have entered my mighty house of JavaScript... "
ar[2] = "Take what you want... "
ar[3] = "But beware of the guard dogs!!!! "
var currentMessage = 0
var offset = 0
function stopBanner() {
if (bannerRunning)
clearTimeout(timerID)
bannerRunning = false
}
function startBanner() {
stopBanner()
showBanner()
}
function showBanner() {
var text = ar[currentMessage]
if (offset < text.length) {
if (text.charAt(offset) == " ")
offset++
var partialMessage = text.substring(0, offset + 1)
window.status = partialMessage
offset++
timerID = setTimeout("showBanner()", speed)
bannerRunning = true
} else {
offset = 0
currentMessage++
if (currentMessage == ar.length)
currentMessage = 0
timerID = setTimeout("showBanner()", pause)
bannerRunning = true
}
}
// -->
</script>
</head>
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080"
onLoad="startBanner()">
</body>
</html>
نویسنده : علی مهاجر
مثله
تاريخ امروز را بدهيد و فردا خودش تاريخ
عوض مي شودبا این کد
میتوانید
به جای گزینه
های تیپ متن مورد نظرتون را وارد کنید تا در
هر روز بدون دخالت خودتان شاهد متنهای
جدید باشید
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Mike W. (mikew@dvol.com) -->
<!-- Web Site: http://www.dvol.com/~users/mikew -->
<!-- Begin
var msg = new Array();
Stamp = new Date();
today = Stamp.getDate();
msg[1] = "Tip 1";
msg[2] = "Tip 2";
msg[3] = "Tip 3";
msg[4] = "Tip 4";
msg[5] = "Tip 5";
msg[6] = "Tip 6";
msg[7] = "Tip 7";
msg[8] = "Tip 8";
msg[9] = "Tip 9";
msg[10] = "Tip 10";
msg[11] = "Tip 11";
msg[12] = "Tip 12";
msg[13] = "Tip 13";
msg[14] = "Tip 14";
msg[15] = "Tip 15";
msg[16] = "Tip 16";
msg[17] = "Tip 17";
msg[18] = "Tip 18";
msg[19] = "Tip 19";
msg[20] = "Tip 20";
msg[21] = "Tip 21";
msg[22] = "Tip 22";
msg[23] = "Tip 23";
msg[24] = "Tip 24";
msg[25] = "Tip 25";
msg[26] = "Tip 26";
msg[27] = "Tip 27";
msg[28] = "Tip 28";
msg[29] = "Tip 29";
msg[30] = "Tip 30";
msg[31] = "Tip 31";
function writeTip() {
document.write(msg[today]);
}
// End -->
</script>
</HEAD>
<!-- CONTINUE -->
<BODY>
<b>Daily Tip:</b>
<script>
writeTip();
</script>
<!-- END Script Size: 1.46 KB -->
نویسنده : علی مهاجر
نمایش
پیغام با کلیک بر روی یک دکمه
<html>
<head>
</head>
<body>
<DIV ID="dropText">
Nazanin Studio
</DIV>
</body>
</html>
نویسنده : علی مهاجر
قفل
کردن انتخاب متن
<script
language="JavaScript1.2">
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>
نویسنده : علی مهاجر
كد موس جادويي
<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,2,2"></LAYER>
<LAYER NAME="a8" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#fff000" CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a9" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffa000" CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a10" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ff00ff" CLIP="0,0,2,2"></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>
<script language="JavaScript">
/*
Magic Wand cursor II (By Kurt at kurt.grigg@virgin.net)
Modified and permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
if (document.all){
with (document){
write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
write('<div style="position:relative;width:1px;height:1px;background:#ffffff;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#fff000;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#ffa000;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#ff00ff;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#00ff00;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#0000ff;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#FF0000;font-size:1px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ffffff;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#fff000;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ffa000;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ff00ff;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#00ff00;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#0000ff;font-size:2px;visibility:visible"></div>')
write('<div style="position:relative;width:3px;height:3px;background:#FF0000;font-size:3px;visibility:visible"></div>')
write('</div>')
}
}
if (document.layers)
{window.captureEvents(Event.MOUSEMOVE);}
var yBase = 200;
var xBase = 200;
var step = 1;
var currStep = 0;
var Xpos = 1;
var Ypos = 1;
if (document.all)
{
function MoveHandler(){
Xpos = document.body.scrollLeft+event.x;
Ypos = document.body.scrollTop+event.y;
}
document.onmousemove = MoveHandler;
}
else if (document.layers)
{
function xMoveHandler(evnt){
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
window.onMouseMove = xMoveHandler;
}
function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/6;
xBase = window.document.body.offsetWidth/6;
}
else if (document.layers)
{
yBase = window.innerHeight/8;
xBase = window.innerWidth/8;
}
if (document.all)
{
for ( i = 0 ; i < starsDiv.all.length ; i++ )
{
starsDiv.all[i].style.top = Ypos + yBase*Math.sin((currStep + i*4)/12)*Math.cos(400+currStep/200);
starsDiv.all[i].style.left = Xpos + xBase*Math.sin((currStep + i*3)/10)*Math.sin(currStep/200);
}
}
else if (document.layers)
{
for ( j = 0 ; j < 14 ; j++ ) //number of NS layers!
{
var templayer="a"+j
document.layers[templayer].top = Ypos + yBase*Math.sin((currStep + j*4)/12)*Math.cos(400+currStep/200);
document.layers[templayer].left = Xpos + xBase*Math.sin((currStep + j*3)/10)*Math.sin(currStep/200);
}
}
currStep+= step;
setTimeout("animateLogo()", 10);
}
animateLogo();
</script>
نویسنده : علی مهاجر
قفل کردن
راست کلیک بدون پیام
<script
language=JavaScript>
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
</script>
نویسنده : علی مهاجر
قفل کردن
راست کلیک با پیام
<SCRIPT language=javascript>
function noRightClick() {
if (event.button==2) {
alert('! هنوز نيومده ميخواي چيکار کني شيطون بلا')
}
}
document.onmousedown=noRightClick
</SCRIPT>
نویسنده : علی مهاجر
قفل کردن
راست کلیک با لرزش صفحه
<SCRIPT language="">
document.onmousedown=click
var times=0
var times2=10
function click() {
if ((event.button==2) || (event.button==3)) {
if (times>=0) { earthquake() }
alert("\n\n Nem faz isso, q aki naum é page lammerz!!");
times++ } }
function earthquake () {
alert("Custom message")
window.moveTo(0, 0)
window.moveTo(1, 1)
window.moveTo(2, 2)
window.moveTo(3, 3)
window.moveTo(4, 4)
window.moveTo(5, 5)
window.moveTo(6, 6)
window.moveTo(7, 7)
window.moveTo(8, 8)
window.moveTo(9, 9)
window.moveTo(10, 10)
window.moveTo(9, 9)
window.moveTo(8, 8)
window.moveTo(7, 7)
window.moveTo(6, 6)
window.moveTo(5, 5)
window.moveTo(4, 4)
window.moveTo(3, 3)
window.moveTo(2, 2)
window.moveTo(1, 1)
tremmors()
}
function tremmors() {
window.moveTo(0, 0)
window.moveTo(1, 1)
window.moveTo(2, 2)
window.moveTo(3, 3)
window.moveTo(4, 4)
window.moveTo(5, 5)
window.moveTo(6, 6)
window.moveTo(7, 7)
window.moveTo(8, 8)
window.moveTo(9, 9)
window.moveTo(10, 10)
window.moveTo(9, 9)
window.moveTo(8, 8)
window.moveTo(7, 7)
window.moveTo(6, 6)
window.moveTo(5, 5)
window.moveTo(4, 4)
window.moveTo(3, 3)
window.moveTo(2, 2)
window.moveTo(1, 1)
tremmors()
}
</SCRIPT>
نویسنده : علی مهاجر
تصویر به
دنبال نشانگر موس با قابلیت غیر فعال کردن
<html>
<head>
</head>
<body>
<script>
var ns = (document.layers)?1:0;
var Anim=new Array(); /* holds interval events */
var imgwidth=40; // Image width
var imgheight=40; // Image height
var button = Array(); // to pre-cache images
button[0]=new Image();
button[0].src="URL PIC 1";
button[1]=new Image();
button[1].src="URL PIC 3";
var text="<table width=10 bgcolor=#ffffff><td><a href='javascript:showhideAnimation()'><center><img name='Button' src='"+button[0].src+"' width='"+imgwidth+"' height='"+imgheight+"' border='0'></center></a></font></td></table>" // A bit of HTML code to display the button
//Initialize some variables to make the button always to appear on the frame's bottom-right corner
if (ns) {
document.write("<LAYER NAME='FlyOnOff' LEFT=0 TOP=0>"+text+"</LAYER>");
horz=".left";
vert=".top";
docStyle="document.";
styleDoc="";
innerW="window..innerWidth";
innerH="window.innerHeight";
offsetX="window.pageXOffset";
offsetY="window.pageYOffset";
}else {
document.write("<div id='FlyOnOff' style='position:absolute; visibility:show; left:235px; top:-50px; z-index:2'>"+text+"</div>");
horz=".pixelLeft";
vert=".pixelTop";
docStyle="";
styleDoc=".style";
innerW="document.body.clientWidth";
innerH="document.body.clientHeight";
offsetX="document.body.scrollLeft";
offsetY="document.body.scrollTop";
}
// Moves the button in the right position
function checkLocation() {
objectXY="FlyOnOff";
var availableX=eval(innerW);
var availableY=eval(innerH);
var currentX=eval(offsetX);
var currentY=eval(offsetY);
x=availableX-(imgwidth+30)+currentX;
y=availableY-(imgheight+20)+currentY;
eval(docStyle + objectXY + styleDoc + horz + "=" + x);
eval(docStyle + objectXY + styleDoc + vert + "=" + y);
}
Anim[0]=setInterval('checkLocation()', 10);
(document.layers)?window.captureEvents(Event.MOUSEMOVE):0;
(document.layers)?window.onMouseMove=getMousePosition:document.onmousemove=getMousePosition;
var Dot_Ro=60; //Dot's distance from the mouse pointer
var Dot_Theta=0; //Dot's initial angle
var Dot_Speed; //Dot's absolute Angular speed
var Dot_Direction=1; //Dot's direction (1=clockwise)
var Dot_x=0; //Dot's original position
var Dot_y=0;
var alpha; //Angle from the fly to the mouse
var mult; //Ausiliary variable to define the angle
var picX = 20; //Fly's coords.
var picY = 100;
var mouseX = 0; //Mouse coords.
var mouseY = 0;
var step = 10; //Pixels
var speed = 100;//u-seconds
// Dir specifies the right picture;
// img pre-caches images.
var dir = Array();
dir[-4]="URL PIC1.gif";
dir[-1]="URL PIC2.gif";
dir[-2]="URL PIC3.gif";
dir[-3]="URL PIC4.gif";
dir[3]="URL PIC1.gif";
dir[4]="URL PIC2.gif";
dir[1]="URL PIC3.gif";
dir[2]="URL PIC4.gif";
dir[0]="";
var img = Array();
for (var i=-4; i<5; i++){
img[i]=new Image();
img[i].src=dir[i];
}
// Some HTML code to show the fly.
if (ns) {
document.write("<LAYER NAME='FlyDiv' LEFT=0 TOP=0><img src="+dir[1]+" name='pic'></LAYER>");
}else {
document.write("<div id='FlyDiv' style='position:absolute'>");
document.write("<img name='pic' src=" + dir[1] + "></div>");
}
// Shows the proper image for the fly.
function display(direction) { //direction must be from -4 to 4, but not 0.
if (ns) {
document.pic.src = dir[direction];
}else{
pic.src = dir[direction];
}
}
function getMousePosition(e) {
mouseY=(ns)?e.pageY:window.event.y + document.body.scrollTop;
mouseX=(ns)?e.pageX:window.event.x + document.body.scrollLeft;
}
//Calculate new position
function calcNewPos() {
var dist=Math.sqrt(Math.pow(mouseY-picY,2) + Math.pow(mouseX-picX,2));
Dot_Speed=Math.PI/15;
Dot_Theta+=Dot_Direction*Dot_Speed;
Dot_x=mouseX+Dot_Ro*Math.cos(Dot_Theta);
Dot_y=mouseY+Dot_Ro*Math.sin(Dot_Theta);
var arg = (Dot_y-picY) / (Dot_x-picX);
mult = (Dot_x - picX < 0)? mult = -1:1;
alpha = Math.atan(arg);
var dx = mult * step * Math.cos(alpha);
var dy = mult * step * Math.sin(alpha);
picX += dx;
picY += dy;
}
//Shows or hides the fly when the "button" is pressed
function showhideAnimation() {
if (ns) {
document.layers['FlyDiv'].visibility=document.layers['FlyDiv'].visibility=="hide"?"show":"hide";
document.Button.src = document.layers['FlyDiv'].visibility=="hide"?button[1].src:button[0].src;
}else {
FlyDiv.style.visibility=="hidden"?FlyDiv.style.visibility = "visible":FlyDiv.style.visibility = "hidden";
Button.src = FlyDiv.style.visibility=="hidden"?button[1].src:button[0].src;
}
}
// Moves the fly around the screen
function moveFly() {
// moves the fly in a new position...
calcNewPos();
if (ns) {
document.layers['FlyDiv'].left = picX;
document.layers['FlyDiv'].top = picY;
}else{
FlyDiv.style.left = picX - pic.width / 2;
FlyDiv.style.top = picY - pic.height / 2;
}
// ... and changes the image.
alpha=-180*alpha/Math.PI;
alpha+=22.5;
var OK=0;
for(var i=0; (i<4)&& !OK; i++){
if (alpha<-Math.PI+45*i){
display(mult*(i+1));
OK=1;
}
}
}
// Changes Dot's turning direction
function ChangeDotDirection() {
Dot_Direction=-Dot_Direction;
Dot_Theta+=Math.PI;
}
//Go!
Anim[1]=setInterval('moveFly()', speed);
Anim[2]=setInterval('ChangeDotDirection()', speed*50);
function killIt()
{
for(var i=0;i<Anim.length;i++)
{
if(Anim[i])
{
clearInterval(Anim[i]);
Anim[i]=null;
}
}
}
</script>
</body>
</html>
نویسنده : علی مهاجر
حرکت فنری
تصویر به دنبال نشانگر موس
<div id="dot0" style="position: absolute; visibility: hidden; height: 11; width: 11;"><img src="URL PIC" height=11 width=11></div>
<div id="dot1" style="position: absolute; height:12; width:12;"><img src="URL PIC" height=15 width=15></div>
<div id="dot2" style="position: absolute; height:12; width:12;"><img src="URL PIC" height=12 width=12></div>
<div id="dot3" style="position: absolute; height:12; width:12;"><img src="URL PIC" height=15 width=15></div>
<div id="dot4" style="position: absolute; height:12; width:12;"><img src="URL PIC" height=12 width=12></div>
<div id="dot5" style="position: absolute; height:12; width:12;"><img src="URL PIC" height=15 width=15></div>
<div id="dot6" style="position: absolute; height:12; width:12;"><img src="URL PIC" height=12 width=12></div>
<SCRIPT LANGUAGE="JavaScript">
<!-- 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>
نویسنده : علی مهاجر
متن
انتخابی شما به دنبال نشانگر موس
<style type="text/css">
<!--
.spanstyle {
position:absolute;
visibility:visible;
top:-50px;
font-size:15pt;
font-family:Verdana;
font-weight:bold;
color:#cc0000;
}
BODY {
width:100%;overflow-x:hidden;overflow-y:scroll;
}
-->
</style>
<script language="JavaScript1.2">
<!--
var x,y
var kern=20
var flag=0
var message="YOUR MESSAGE"
message=message.split("")
var xpos=new Array()
for (i=0;i<message.length;i++) {
xpos[i]=-50
}
var ypos=new Array()
for (i=0;i<message.length;i++) {
ypos[i]=-50
}
function handlerMM(e){
x = (e) ? e.pageX : document.body.scrollLeft+event.clientX
y = (e) ? e.pageY : document.body.scrollTop+event.clientY
flag=1
}
function makebanner() {
if (flag==1) {
for (i=message.length-1; i>=1; i--) {
xpos[i]=xpos[i-1]+kern
ypos[i]=ypos[i-1]
}
xpos[0]=x+kern
ypos[0]=y
for (i=0; i<message.length; i++) {
if (document.getElementById) {
var thisspan =
document.getElementById("span"+i).style
} else {
var thisspan =
eval((document.layers)?"document.span"+i:"span"+(i)+".style")
}
if (thisspan.posLeft) {
thisspan.posLeft=xpos[i]
thisspan.posTop=ypos[i]
}
if (!thisspan.posLeft) {
thisspan.left=xpos[i]
thisspan.top=ypos[i]
}
}
}
var timer=setTimeout("makebanner()",30)
}
window.onload=makebanner;
//-->
</script>
<script language="JavaScript1.2">
<!--
for (i=0;i<message.length;i++) {
document.write("<span id='span"+i+"' class='spanstyle'>")
document.write(message[i])
document.write("</span>")
}
if (document.layers){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;
//-->
</script>
نویسنده : علی مهاجر
چرخش متن
انتخابی شما به دور نشانگر موس
<head>
<meta http-equiv="Content-Language" content="en-us">
</head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (document.all) {
//Things you can alter
yourLogo = "welcome to my weblog"; //Not less than 2 letters!
logoFont = "Arial";
logoColor = "red";
//Nothing needs altering below!
yourLogo = yourLogo.split('');
L = yourLogo.length;
TrigSplit = 360 / L;
Sz = new Array()
logoWidth = 100;
logoHeight = -30;
ypos = 0;
xpos = 0;
step = 0.03;
currStep = 0;
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < L; i++) {
document.write('<div id="ie" style="position:absolute;top:0px;left:0px;'
+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;'
+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>');
}
document.write('</div></div>');
function Mouse() {
ypos = event.y;
xpos = event.x - 5;
}
document.onmousemove=Mouse;
function animateLogo() {
outer.style.pixelTop = document.body.scrollTop;
for (i = 0; i < L; i++) {
ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
Sz[i] = ie[i].style.pixelTop - ypos;
if (Sz[i] < 5) Sz[i] = 5;
ie[i].style.fontSize = Sz[i] / 1.7;
}
currStep -= step;
setTimeout('animateLogo()', 20);
}
window.onload = animateLogo;
}
// End -->
</script>
</body>
</html>
نویسنده : علی مهاجر
چرخش سه
رنگ به دور نشانگر موس
<body>
<script language="JavaScript">
var a_Colour="red";
var b_Colour="blue";
var c_Colour="green";
var Size=40;
//Alter nothing below !!
var YDummy=new Array(),XDummy=new Array(),xpos=0,ypos=0,ThisStep=0;step=0.03;
if (document.layers){
window.captureEvents(Event.MOUSEMOVE);
function nsMouse(evnt){
xpos = window.pageYOffset+evnt.pageX+6;
ypos = window.pageYOffset+evnt.pageY+16;
}
window.onMouseMove = nsMouse;
}
else if (document.all)
{
function ieMouse(){
xpos = document.body.scrollLeft+event.x+6;
ypos = document.body.scrollTop+event.y+16;
}
document.onmousemove = ieMouse;
}
function swirl(){
for (i = 0; i < 3; i++)
{
YDummy[i]=ypos+Size*Math.cos(ThisStep+i*2)*Math.sin((ThisStep)*6);
XDummy[i]=xpos+Size*Math.sin(ThisStep+i*2)*Math.sin((ThisStep)*6);
}
ThisStep+=step;
setTimeout('swirl()',10);
}
var amount=10;
if (document.layers){
for (i = 0; i < amount; i++)
{
document.write('<layer name=nsa'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+a_Colour+'></layer>');
document.write('<layer name=nsb'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+b_Colour+'></layer>');
document.write('<layer name=nsc'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+c_Colour+'></layer>');
}
}
else if (document.all){
document.write('<div id="ODiv" style="position:absolute;top:0px;left:0px">'
+'<div id="IDiv" style="position:relative">');
for (i = 0; i < amount; i++)
{
document.write('<div id=x style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+a_Colour+';font-size:'+i/2+'"></div>');
document.write('<div id=y style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+b_Colour+';font-size:'+i/2+'"></div>');
document.write('<div id=z style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+c_Colour+';font-size:'+i/2+'"></div>');
}
document.write('</div></div>');
}
function prepos(){
var ntscp=document.layers;
var msie=document.all;
if (document.layers){
for (i = 0; i < amount; i++)
{
if (i < amount-1)
{
ntscp['nsa'+i].top=ntscp['nsa'+(i+1)].top;ntscp['nsa'+i].left=ntscp['nsa'+(i+1)].left;
ntscp['nsb'+i].top=ntscp['nsb'+(i+1)].top;ntscp['nsb'+i].left=ntscp['nsb'+(i+1)].left;
ntscp['nsc'+i].top=ntscp['nsc'+(i+1)].top;ntscp['nsc'+i].left=ntscp['nsc'+(i+1)].left;
}
else
{
ntscp['nsa'+i].top=YDummy[0];ntscp['nsa'+i].left=XDummy[0];
ntscp['nsb'+i].top=YDummy[1];ntscp['nsb'+i].left=XDummy[1];
ntscp['nsc'+i].top=YDummy[2];ntscp['nsc'+i].left=XDummy[2];
}
}
}
else if (document.all){
for (i = 0; i < amount; i++)
{
if (i < amount-1)
{
msie.x[i].style.top=msie.x[i+1].style.top;msie.x[i].style.left=msie.x[i+1].style.left;
msie.y[i].style.top=msie.y[i+1].style.top;msie.y[i].style.left=msie.y[i+1].style.left;
msie.z[i].style.top=msie.z[i+1].style.top;msie.z[i].style.left=msie.z[i+1].style.left;
}
else
{
msie.x[i].style.top=YDummy[0];msie.x[i].style.left=XDummy[0];
msie.y[i].style.top=YDummy[1];msie.y[i].style.left=XDummy[1];
msie.z[i].style.top=YDummy[2];msie.z[i].style.left=XDummy[2];
}
}
}
setTimeout("prepos()",10);
}
function Start(){
swirl(),prepos()
}
window.onload=Start;
// -->
</script>
</body></body>
</html>
نویسنده : علی مهاجر
ساعت به دنبال نشانگر موس 1
<SCRIPT LANGUAGE="JavaScript">
colors = new Array('330099','00ff00','ff00ff'); //Clock face colors.
sCol = 'ff00ff'; //seconds colour.
mCol = '00ff00'; //minutes colour.
hCol = '330099'; //hours colour.
H = 'Hours...';
H = H.split('');
H = H.reverse();
M = 'Minutes...';
M = M.split('');
M = M.reverse();
S = 'Seconds...';
S = S.split('');
S = S.reverse();
dots = 12;
var Ypos = 0,Xpos = 0,Ybase = 0,Xbase = 0;
var ay = 0, ax = 0, Ay = 0, Ax = 0, by = 0, bx = 0, By = 0, Bx = 0, cy = 0, cx = 0, Cy = 0, Cx = 0, dy = 0, dx = 0, Dy = 0, Dx = 0;
count = 0;
count_a = 0;
move = 1;
ns = (document.layers)?1:0;
viz = (document.layers)?'hide':'hidden';
if (ns) {
for (i = 0; i < dots; i++)
document.write('<layer name=nface'+i+' top=0 left=0 bgcolor=#ffffff clip="0,0,3,3"></layer>');
for (i = 0; i < S.length; i++)
document.write('<layer name=nx'+i+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+sCol+'><center>'+S[i]+'</center></font></layer>');
for (i = 0; i < M.length; i++)
document.write('<layer name=ny'+i+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+mCol+'><center>'+M[i]+'</center></font></layer>');
for (i = 0; i < H.length; i++)
document.write('<layer name=nz'+i+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+hCol+'><center>'+H[i]+'</center></font></layer>');
}
else{
document.write('<div id="W" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < dots; i++) {
document.write('<div id="face" style="position:absolute;top:0px;left:0px;width:3px;height:3px;font-size:3px;background:#ffffff"></div>');
}
document.write('</div></div>');
document.write('<div id="X" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < S.length; i++) {
document.write('<div id="x" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:12px;color:'+sCol+';text-align:center;padding-top:10px">'+S[i]+'</div>');
}
document.write('</div></div>')
document.write('<div id="Y" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < M.length; i++) {
document.write('<div id="y" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:12px;color:'+mCol+';text-align:center;padding-top:10px">'+M[i]+'</div>');
}
document.write('</div></div>')
document.write('<div id="Z" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < H.length; i++) {
document.write('<div id="z" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:12px;color:'+hCol+';text-align:center;padding-top:10px">'+H[i]+'</div>');
}
document.write('</div></div>');
}
if (ns) {
window.captureEvents(Event.MOUSEMOVE);
function nsMouse(evnt) {
Ypos = evnt.pageY + 100;
Xpos = evnt.pageX + 100;
}
window.onMouseMove = nsMouse;
}
else{
function ieMouse() {
Ypos = event.y + 100;
Xpos = event.x + 100;
}
document.onmousemove = ieMouse;
}
function clock() {
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs / 30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins / 30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr / 6 + Math.PI * parseInt(time.getMinutes()) / 360;
Ybase = 15;
Xbase = 15;
if (ns) {
document.layers["nx"+0].visibility = viz;
document.layers["ny"+0].visibility = viz;
document.layers["nz"+0].visibility = viz;
for (i = 0; i < S.length; i++) {
document.layers["nx"+i].top = ay - 12 + (i * Ybase) * Math.sin(sec);
document.layers["nx"+i].left = ax - 12 + (i * Xbase) * Math.cos(sec);
}
for (i = 0; i < M.length; i++) {
document.layers["ny"+i].top = by - 12 + (i * Ybase) * Math.sin(min);
document.layers["ny"+i].left = bx - 12 + (i * Xbase) * Math.cos(min);
}
for (i = 0; i < H.length; i++) {
document.layers["nz"+i].top = cy - 12 + (i * Ybase) * Math.sin(hrs);
document.layers["nz"+i].left = cx - 12 + (i * Xbase) * Math.cos(hrs);
}
for (i = 0; i < dots; ++i) {
document.layers["nface"+i].top = dy - 2 + (70 * Math.sin(-0.49+dots+i/1.9));
document.layers["nface"+i].left = dx + 4 + (70 * Math.cos(-0.49+dots+i/1.9));
}
}
else {
var scrll = document.body.scrollTop;
W.style.pixelTop = scrll;
X.style.pixelTop = scrll;
Y.style.pixelTop = scrll;
Z.style.pixelTop = scrll;
x[0].style.visibility=viz;
y[0].style.visibility = viz;
z[0].style.visibility = viz;
for (i = 0; i < S.length; i++) {
x[i].style.pixelTop = ay - 12 + (i * Ybase) * Math.sin(sec);
x[i].style.pixelLeft = ax - 12 + (i * Xbase) * Math.cos(sec);
}
for (i = 0; i < M.length; i++) {
y[i].style.pixelTop = by - 12 + (i * Ybase) * Math.sin(min);
y[i].style.pixelLeft = bx - 12 + (i * Xbase) * Math.cos(min);
}
for (i = 0; i < H.length; i++) {
z[i].style.pixelTop = cy - 12 + (i * Ybase) * Math.sin(hrs);
z[i].style.pixelLeft = cx - 12 + (i * Xbase) * Math.cos(hrs);
}
for (i = 0; i < dots; ++i) {
face[i].style.pixelTop = dy + 6 + (70 * Math.sin(-0.49 + dots + i / 1.9));
face[i].style.pixelLeft = dx + 4 + (70 * Math.cos(-0.49 + dots + i / 1.9));
}
}
}
function MouseFollow() {
ay = Math.round(Ay += ((Ypos) - Ay) * 4 / 15);
ax = Math.round(Ax += ((Xpos) - Ax) * 4 / 15);
by = Math.round(By += (ay - By) * 4 / 15);
bx = Math.round(Bx += (ax - Bx) * 4 / 15);
cy = Math.round(Cy += (by - Cy) * 4 / 15);
cx = Math.round(Cx += (bx - Cx) * 4 / 15);
dy = Math.round(Dy += (cy - Dy) * 4 / 15);
dx = Math.round(Dx += (cx - Dx) * 4 / 15);
clock();
setTimeout('MouseFollow()',10);
}
function colorstep() {
count +=move;
if (count >= dots) {count=0;count_a += move}
if (count_a == colors.length) count_a = 0;
if (ns) document.layers["nface"+count].bgColor = colors[count_a];
else face[count].style.background = colors[count_a];
setTimeout('colorstep()',100)
}
function StartAll() {
MouseFollow();
colorstep();
}
if (document.layers || document.all) window.onload = StartAll;
</script>
<p align="center"> </p>
نویسنده : علی مهاجر
ساعت به دنبال
نشانگر موس2
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Kurt Grigg (kurt.grigg@virgin.net) -->
<!-- Web Site: http://website.lineone.net/~kurt.grigg/javascript -->
<!-- Edited by Mahdi Peivandi- JavaKadeh -->
<!-- Begin
colors = new Array('330099','00ff00','ff00ff'); //Clock face colors.
sCol = 'ff00ff'; //seconds colour.
mCol = '00ff00'; //minutes colour.
hCol = '330099'; //hours colour.
//Alter nothing below!
H = '****';
H = H.split('');
H = H.reverse();
M = '*****';
M = M.split('');
M = M.reverse();
S = '*****';
S = S.split('');
S = S.reverse();
dots = 12;
var Ypos = 0,Xpos = 0,Ybase = 0,Xbase = 0;
var ay = 0, ax = 0, Ay = 0, Ax = 0, by = 0, bx = 0, By = 0, Bx = 0, cy = 0, cx = 0, Cy = 0, Cx = 0, dy = 0, dx = 0, Dy = 0, Dx = 0;
count = 0;
count_a = 0;
move = 1;
ns = (document.layers)?1:0;
viz = (document.layers)?'hide':'hidden';
if (ns) {
for (i = 0; i < dots; i++)
document.write('<layer name=nface'+i+' top=0 left=0 bgcolor=#ffffff clip="0,0,3,3"></layer>');
for (i = 0; i < S.length; i++)
document.write('<layer name=nx'+i+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+sCol+'><center>'+S[i]+'</center></font></layer>');
for (i = 0; i < M.length; i++)
document.write('<layer name=ny'+i+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+mCol+'><center>'+M[i]+'</center></font></layer>');
for (i = 0; i < H.length; i++)
document.write('<layer name=nz'+i+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+hCol+'><center>'+H[i]+'</center></font></layer>');
}
else{
document.write('<div id="W" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < dots; i++) {
document.write('<div id="face" style="position:absolute;top:0px;left:0px;width:3px;height:3px;font-size:3px;background:#ffffff"></div>');
}
document.write('</div></div>');
document.write('<div id="X" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < S.length; i++) {
document.write('<div id="x" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:12px;color:'+sCol+';text-align:center;padding-top:10px">'+S[i]+'</div>');
}
document.write('</div></div>')
document.write('<div id="Y" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < M.length; i++) {
document.write('<div id="y" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:12px;color:'+mCol+';text-align:center;padding-top:10px">'+M[i]+'</div>');
}
document.write('</div></div>')
document.write('<div id="Z" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < H.length; i++) {
document.write('<div id="z" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:12px;color:'+hCol+';text-align:center;padding-top:10px">'+H[i]+'</div>');
}
document.write('</div></div>');
}
if (ns) {
window.captureEvents(Event.MOUSEMOVE);
function nsMouse(evnt) {
Ypos = evnt.pageY + 100;
Xpos = evnt.pageX + 100;
}
window.onMouseMove = nsMouse;
}
else{
function ieMouse() {
Ypos = event.y + 100;
Xpos = event.x + 100;
}
document.onmousemove = ieMouse;
}
function clock() {
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs / 30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins / 30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr / 6 + Math.PI * parseInt(time.getMinutes()) / 360;
Ybase = 15;
Xbase = 15;
if (ns) {
document.layers["nx"+0].visibility = viz;
document.layers["ny"+0].visibility = viz;
document.layers["nz"+0].visibility = viz;
for (i = 0; i < S.length; i++) {
document.layers["nx"+i].top = ay - 12 + (i * Ybase) * Math.sin(sec);
document.layers["nx"+i].left = ax - 12 + (i * Xbase) * Math.cos(sec);
}
for (i = 0; i < M.length; i++) {
document.layers["ny"+i].top = by - 12 + (i * Ybase) * Math.sin(min);
document.layers["ny"+i].left = bx - 12 + (i * Xbase) * Math.cos(min);
}
for (i = 0; i < H.length; i++) {
document.layers["nz"+i].top = cy - 12 + (i * Ybase) * Math.sin(hrs);
document.layers["nz"+i].left = cx - 12 + (i * Xbase) * Math.cos(hrs);
}
for (i = 0; i < dots; ++i) {
document.layers["nface"+i].top = dy - 2 + (70 * Math.sin(-0.49+dots+i/1.9));
document.layers["nface"+i].left = dx + 4 + (70 * Math.cos(-0.49+dots+i/1.9));
}
}
else {
var scrll = document.body.scrollTop;
W.style.pixelTop = scrll;
X.style.pixelTop = scrll;
Y.style.pixelTop = scrll;
Z.style.pixelTop = scrll;
x[0].style.visibility=viz;
y[0].style.visibility = viz;
z[0].style.visibility = viz;
for (i = 0; i < S.length; i++) {
x[i].style.pixelTop = ay - 12 + (i * Ybase) * Math.sin(sec);
x[i].style.pixelLeft = ax - 12 + (i * Xbase) * Math.cos(sec);
}
for (i = 0; i < M.length; i++) {
y[i].style.pixelTop = by - 12 + (i * Ybase) * Math.sin(min);
y[i].style.pixelLeft = bx - 12 + (i * Xbase) * Math.cos(min);
}
for (i = 0; i < H.length; i++) {
z[i].style.pixelTop = cy - 12 + (i * Ybase) * Math.sin(hrs);
z[i].style.pixelLeft = cx - 12 + (i * Xbase) * Math.cos(hrs);
}
for (i = 0; i < dots; ++i) {
face[i].style.pixelTop = dy + 6 + (70 * Math.sin(-0.49 + dots + i / 1.9));
face[i].style.pixelLeft = dx + 4 + (70 * Math.cos(-0.49 + dots + i / 1.9));
}
}
}
function MouseFollow() {
ay = Math.round(Ay += ((Ypos) - Ay) * 4 / 15);
ax = Math.round(Ax += ((Xpos) - Ax) * 4 / 15);
by = Math.round(By += (ay - By) * 4 / 15);
bx = Math.round(Bx += (ax - Bx) * 4 / 15);
cy = Math.round(Cy += (by - Cy) * 4 / 15);
cx = Math.round(Cx += (bx - Cx) * 4 / 15);
dy = Math.round(Dy += (cy - Dy) * 4 / 15);
dx = Math.round(Dx += (cx - Dx) * 4 / 15);
clock();
setTimeout('MouseFollow()',10);
}
function colorstep() {
count +=move;
if (count >= dots) {count=0;count_a += move}
if (count_a == colors.length) count_a = 0;
if (ns) document.layers["nface"+count].bgColor = colors[count_a];
else face[count].style.background = colors[count_a];
setTimeout('colorstep()',100)
}
function StartAll() {
MouseFollow();
colorstep();
}
if (document.layers || document.all) window.onload = StartAll;
// End -->
</script>
<!-- END Script Size: 6.73 KB -->
نویسنده : علی مهاجر
پخش فايل
صوتی پس زمينه
<BGSOUND
src="Your link for music/Your link for music.html">
نویسنده : علی مهاجر
پخش موزیک
همراه با دکمه های کنترل
<P align=center><EMBED
style="BORDER-RIGHT: silver 4px outset; BORDER-TOP: silver 4px outset; BORDER-LEFT: silver 4px outset; BORDER-BOTTOM: silver 4px outset"
src="URL/URL.html"
width="145" height="45"
controls="controlpanel" AUTOSTART="TRUE" LOOP="TRUE"></P>
نویسنده : علی مهاجر
ا نتخاب موزیک
توسط کاربر از روی هارد دیسک خود همراه با تایمر پخش
<HTML>
<HEAD>
<script language="javascript">
function da(form){
ut=new Date()
h=ut.getHours()
m=ut.getMinutes()
if (h<10) h="0"+h
if (m<10) m="0"+m
time=h+":"+m
document.frm.txt.value=time
setTimeout("da(this.form)",1000)
}
function alermon(){
hr=document.frm.se1.selectedIndex
mn=document.frm.se2.selectedIndex
tim=document.frm.se1.options[hr].value+":"+document.frm.se2.options[mn].value
if (h>12) time="0"+(h-12)+":"+m
if (h=00) time="12"+":"+m
if (time==tim){
document.all.sound.src=document.frm.alermsound.value
}
else setTimeout("alermon()",1000)
}
function alermoff(){
document.all.sound.src=""
tim=0
}
</script>
<bgSound src="" id="sound">
</HEAD>
<BODY onload="da(this.form)">
<font color="red" size="6">Alerm Clock</font>
<form name="frm">
your system clock is:<input type="text" name="txt" size="12"><p>
<font size="4" color="#0000FF">step1:</font>when you want the clock is ringing?
select hour:<select name="se1" size=1>
<option selected value="01">01 or 13
<option value="02">02 or 14
<option value="03">03 or 15
<option value="04">04 or 16
<option value="05">05 or 17
<option value="06">06 or 18
<option value="07">07 or 19
<option value="08">08 or 20
<option value="09">09 or 21
<option value="10">10 or 22
<option value="11">11 or 23
<option value="12">12 or 24
</select>
select minute:<select name="se2" size=1>
<option selected value="00">00<option value="01">01<option value="02">02<option
value="03">03<option value="04">04
<option value="05">05<option value="06">06<option value="07">07<option
value="08">08<option value="09">09
<option value="10">10<option value="11">11<option value="12">12<option
value="13">13<option value="14">14
<option value="15">15<option value="16">16<option value="17">17<option
value="18">18<option value="19">19
<option value="20">20<option value="21">21<option value="22">22<option
value="23">23<option value="24">24
<option value="25">25<option value="26">26<option value="27">27<option
value="28">28<option value="29">29
<option value="30">30<option value="31">31<option value="32">32<option
value="33">33<option value="34">34
<option value="35">35<option value="36">36<option value="37">37<option
value="38">38<option value="39">39
<option value="40">40<option value="41">41<option value="42">42<option
value="43">43<option value="44">44
<option value="45">45<option value="46">46<option value="47">47<option
value="48">48<option value="49">49
<option value="50">50<option value="51">51<option value="52">52<option
value="53">53<option value="54">54
<option value="55">55<option value="56">56<option value="57">57<option
value="58">58<option value="59">59
</select><p>
<font size="4" color="#0000FF">step2:</font>browse your sound file:
<input type="file" size=36 name="alermsound"><p>
<font color="#0000FF" size="4">step3:</font><input type="button" value="on"
onclick="alermon()"> <input type="button" value="off" onclick="alermoff()"><br>
if you minimize this window you can't hear any sound.
</form>
</BODY>
</HTML>
نویسنده : علی مهاجر
ساعت آنالوگ
step1:copy this code to head
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />
<object id="VMLRender" codebase="vgx.dll" classid="CLSID:10072CEC-8CC1-11D1-986E-00A0C955B42E">
</object>
<style>
<!--
v\:* { behavior: url(#VMLRender); }
-->
</style>
<script language="JavaScript1.2">
<!--
/*
DHTML analog clock II (By Erik Arvidsson at http://webfx.eae.net)
Slight modifications to script made by Dynamicdrive.com
Permission granted to Dynamicdrive.com to include script in archive
For this and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
//specify clock size in pixels
var clocksize=135
function updatePointers() {
var now = new Date();
secondsPointer.style.rotation = now.getSeconds() * 6;
minutesPointer.style.rotation = now.getMinutes() * 6 + now.getSeconds() / 10;
hoursPointer.style.rotation = now.getHours() * 30 + now.getMinutes() / 2;
}
if (document.all&&window.print){
window.attachEvent("onload", initVMLClock);
window.attachEvent("onresize", resizeObjects);
}
function initVMLClock() {
resizeObjects();
updatePointers();
window.setInterval("updatePointers()", 1000);
}
function resizeObjects() {
var size = Math.min(clocksize, clocksize);
clock.style.pixelWidth = size - 2*(size * 0.045);
clock.style.pixelHeight = size - 2*(size * 0.045);
clock.childNodes.item(0).childNodes.item(0).weight = size * 0.01;
secondsPointer.childNodes.item(0).childNodes.item(0).weight = size * 0.001;
minutesPointer.childNodes.item(0).childNodes.item(0).weight = size * 0.002;
hoursPointer.childNodes.item(0).childNodes.item(0).weight = size * 0.004;
}
function toggle(sId) {
var el = document.getElementById(sId);
el.style.display = (el.style.display == "none") ? "block" : "none";
}
//-->
</script>
step2:copy this code to body
<v:group id="clock" coordsize="100 100" style="position: relative;">
<v:oval style="width: 100%; height: 100%">
<v:stroke weight="10px" color="gray"/>
<!-- I removed this gradient fill to match the WebFX color theme
<v:fill type="gradient" color="white" color2="#eeeeff" angle="225deg"/>
-->
</v:oval>
<v:group id="secondsPointer" style="width: 100%; height: 100%; position: absolute; top: 0px; left: 0px;">
<v:line from="50,50" to="50,5">
<v:stroke weight="2px" endcap="round" color="navy"/>
</v:line>
</v:group>
<v:group id="minutesPointer" style="width: 100%; height: 100%; position: absolute; top: 0px; left: 0px;">
<v:line from="50,50" to="50,8">
<v:stroke weight="4px" endcap="round" color="navy"/>
</v:line>
</v:group>
<v:group id="hoursPointer" style="width: 100%; height: 100%; position: absolute; top: 0px; left: 0px;">
<v:line from="50,50" to="50,18">
<v:stroke weight="7px" endcap="round" color="navy"/>
</v:line>
</v:group>
</v:group>
نویسنده : علی مهاجر
ساعت دیجیتال
<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."
document.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" BGCOLOR="000080"
TEXT="ffffff">
<CENTER><form name="clock" onSubmit="0">
<input type="text" name="face" size=13 value=""></CENTER>
نویسنده : علی مهاجر
ساعت عقربه دار لغزان
</SCRIPT>
<SCRIPT language=JavaScript>
fCol='FF0099'; //face colour.
sCol='9900FF'; //seconds colour.
mCol='00FFFF'; //minutes colour.
hCol='00FFFF'; //hours colour.
Ybase=30; //Clock height.
Xbase=40; //Clock width.
H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
NS4=(document.layers);
NS6=(document.getElementById&&!document.all);
IE4=(document.all);
Ypos=0;
Xpos=0;
dots=12;
Split=360/dots;
if (NS6){
for (i=1; i < dots+1; i++){
document.write('<div id="n6Digits'+i+'" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial;font-size:10px;color:#'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
}
for (i=0; i < M.length; i++){
document.write('<div id="Ny'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+mCol+'"></div>');
}
for (i=0; i < H.length; i++){
document.write('<div id="Nz'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+hCol+'"></div>');
}
for (i=0; i < S.length; i++){
document.write('<div id="Nx'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+sCol+'"></div>');
}
}
if (NS4){
dgts='1 2 3 4 5 6 7 8 9 10 11 12';
dgts=dgts.split(' ')
for (i=0; i < dots; i++){
document.write('<layer name=nsDigits'+i+' top=0 left=0 height=30 width=30><center><font face=Arial size=1 color='+fCol+'>'+dgts[i]+'</font></center></layer>');
}
for (i=0; i < M.length; i++){
document.write('<layer name=ny'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>');
}
for (i=0; i < H.length; i++){
document.write('<layer name=nz'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>');
}
for (i=0; i < S.length; i++){
document.write('<layer name=nx'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>');
}
}
if (IE4){
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=1; i < dots+1; i++){
document.write('<div id="ieDigits" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial;font-size:10px;color:'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++){
document.write('<div id=y style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++){
document.write('<div id=z style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++){
document.write('<div id=x style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>');
}
document.write('</div></div>')
}
function clock(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.57 + Math.PI * hr/6 + Math.PI*parseInt(time.getMinutes())/360;
if (NS6){
Ypos=window.pageYOffset+window.innerHeight-Ybase-25;
Xpos=window.pageXOffset+window.innerWidth-Xbase-30;
for (i=1; i < dots+1; i++){
document.getElementById("n6Digits"+i).style.top=Ypos-15+Ybase*Math.sin(-1.56 +i *Split*Math.PI/180)
document.getElementById("n6Digits"+i).style.left=Xpos-15+Xbase*Math.cos(-1.56 +i*Split*Math.PI/180)
}
for (i=0; i < S.length; i++){
document.getElementById("Nx"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(sec);
document.getElementById("Nx"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(sec);
}
for (i=0; i < M.length; i++){
document.getElementById("Ny"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(min);
document.getElementById("Ny"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(min);
}
for (i=0; i < H.length; i++){
document.getElementById("Nz"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(hrs);
document.getElementById("Nz"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(hrs);
}
}
if (NS4){
Ypos=window.pageYOffset+window.innerHeight-Ybase-20;
Xpos=window.pageXOffset+window.innerWidth-Xbase-30;
for (i=0; i < dots; ++i){
document.layers["nsDigits"+i].top=Ypos-5+Ybase*Math.sin(-1.045 +i*Split*Math.PI/180)
document.layers["nsDigits"+i].left=Xpos-15+Xbase*Math.cos(-1.045 +i*Split*Math.PI/180)
}
for (i=0; i < S.length; i++){
document.layers["nx"+i].top=Ypos+i*Ybase/4.1*Math.sin(sec);
document.layers["nx"+i].left=Xpos+i*Xbase/4.1*Math.cos(sec);
}
for (i=0; i < M.length; i++){
document.layers["ny"+i].top=Ypos+i*Ybase/4.1*Math.sin(min);
document.layers["ny"+i].left=Xpos+i*Xbase/4.1*Math.cos(min);
}
for (i=0; i < H.length; i++){
document.layers["nz"+i].top=Ypos+i*Ybase/4.1*Math.sin(hrs);
document.layers["nz"+i].left=Xpos+i*Xbase/4.1*Math.cos(hrs);
}
}
if (IE4){
Ypos=document.body.scrollTop+window.document.body.clientHeight-Ybase-20;
Xpos=document.body.scrollLeft+window.document.body.clientWidth-Xbase-20;
for (i=0; i < dots; ++i){
ieDigits[i].style.pixelTop=Ypos-15+Ybase*Math.sin(-1.045 +i *Split*Math.PI/180)
ieDigits[i].style.pixelLeft=Xpos-15+Xbase*Math.cos(-1.045 +i *Split*Math.PI/180)
}
for (i=0; i < S.length; i++){
x[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(sec);
x[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(sec);
}
for (i=0; i < M.length; i++){
y[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(min);
y[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(min);
}
for (i=0; i < H.length; i++){
z[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(hrs);
z[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(hrs);
}
}
setTimeout('clock()',100);
}
clock();
//-->
</SCRIPT>
<SCRIPT language=JavaScript>
fCol='FF0099'; //face colour.
sCol='9900FF'; //seconds colour.
mCol='00FFFF'; //minutes colour.
hCol='00FFFF'; //hours colour.
Ybase=30; //Clock height.
Xbase=40; //Clock width.
</body>
</html>
نویسنده : علی مهاجر
ساعت میله ای با جدول
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function clock() {
var t = new Date();
var h = t.getHours();
var m = t.getMinutes();
var s = t.getSeconds();
var units = new String("");
var hours = t.getHours();
var min = t.getMinutes();
var sec = t.getSeconds();
document.clock.hours.value = units.substring(0, hours);
document.clock.minutes.value = units.substring(0, min);
document.clock.seconds.value = units.substring(0, sec);
var status = "AM";
if (hours > 11)
status = "PM";
if (hours < 11)
hours -= 12;
if (min < 10)
min = "0" + min;
if (sec < 10)
sec = "0" + sec;
document.clock.h.value = hours;
document.clock.m.value = min;
document.clock.s.value = sec;
document.clock.time.value = hours + ":" + min + ":" + sec + " " + status;
window.setTimeout("clock()", 900);
}
// End -->
</script>
</HEAD>
<!-- CONTINUE -->
<BODY onLoad="clock();">
<!-- STEP THREE: Copy this code into the BODY of your HTML document -->
<form name="clock"><table><tr><td>Hours:</td><td>
<input type="text" name="h" size="10" style="border: 0"></td></tr><tr><td colspan=2><input type=text name="hours" size="24" style="color: navy"></td>
</tr><tr><td>Minutes:</td><td><input type="text" name="m" size="10" style="border: 0">
</td></tr><tr><td colspan=2><input type=text name="minutes" size="60" style="color: navy"></td></tr>
<tr><td>Seconds:</td><td><input type="text" name="s" size="10" style="border: 0"></td>
</tr><tr><td colspan=2><input type=text name="seconds" size="69" style="color: navy">
</td></tr><tr><td>Time: <input type=text name="time" size="20" style="border: 0">
</td></tr></table></form>
<!-- END Script Size: 3.07 KB -->
نویسنده : علی مهاجر
ساعت عقربه دار ثابت
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Randy Bennett (rbennett@thezone.net) -->
<!-- Web Site: http://home.thezone.net/~rbennett/utility/sitemap.htm -->
<!-- Edited by Mahdi Peivandi - JavaKadeh -->
<!-- Begin
pX = 100;
pY = 100;
obs = new Array(13);
function ob() {
for (i = 0; i < 13; i++) {
if (document.all) obs[i] = new Array (eval('ob'+i).style,-100,-100);
else obs[i] = new Array (eval('document.ob'+i),-100,-100);
}
}
function cl(a, b, c) {
if (document.all) {
if (a != 0) b += -1;
eval('c'+a+'.style.pixelTop='+(pY+(c)));
eval('c'+a+'.style.pixelLeft='+(pX+(b)));
}
else {
if (a != 0) b += 10;
eval('document.c'+a+'.top='+(pY+(c)));
eval('document.c'+a+'.left='+(pX+(b)));
}
}
function runClock() {
for (i = 0; i < 13; i++) {
obs[i][0].left=obs[i][1]+pX;
obs[i][0].top=obs[i][2]+pY;
}
}
var lastsec;
function timer() {
time = new Date ();
sec = time.getSeconds();
if (sec != lastsec) {
lastsec = sec;
sec = Math.PI * sec / 30;
min = Math.PI * time.getMinutes() / 30;
hr = Math.PI * time.getHours() / 6 + Math.PI * parseInt(time.getMinutes()) / 360;
for (i = 1; i < 6; i++) {
obs[i][1] = Math.sin(sec) * (44 - (i-1) * 11) - 16;
if (document.layers)obs[i][1] += 10;
obs[i][2] = -Math.cos(sec) * (44 - (i-1) * 11) - 27;
}
for (i = 6;i < 10; i++) {
obs[i][1] = Math.sin(min) * (40 - (i-6) * 10) - 16;
if (document.layers)obs[i][1] += 10;
obs[i][2] = -Math.cos(min) * (40 - (i-6) * 10) - 27;
}
for (i = 10; i < 13; i++) {
obs[i][1] = Math.sin(hr) * (37 - (i-10) * 11) - 16;
if (document.layers)obs[i][1] += 10;
obs[i][2] = -Math.cos(hr) * (37 - (i-10) * 11) - 27;
}
}
}
function setNum() {
cl (0, -67, -65);
cl (1, 10, -51);
cl (2, 28, -33);
cl (3, 35, -8);
cl (4, 28, 17);
cl (5, 10, 35);
cl (6, -15, 42);
cl (7, -40, 35);
cl (8, -58, 17);
cl (9, -65, -8);
cl (10, -58, -33);
cl (11, -40, -51);
cl (12, -16, -56);
}
function startClock() {
ob();
setNum();
setInterval('timer()', 100);
setInterval('runClock()', 100);
}
// End -->
</script>
<style>
..num {color:white;width:30px;text-align:center; }
</style>
</HEAD>
<body onLoad="javascript:startClock();">
<div id="c0" style="position:absolute;left:36;top:36; z-index:2;">
<table>
<tr>
<td bgcolor=000000 width=120 height=120>
</td>
</tr>
</table>
</div>
<div id="c1" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>1</b></div>
<div id="c2" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>2</b></div>
<div id="c3" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>3</b></div>
<div id="c4" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>4</b></div>
<div id="c5" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>5</b></div>
<div id="c6" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>6</b></div>
<div id="c7" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>7</b></div>
<div id="c8" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>8</b></div>
<div id="c9" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>9</b></div>
<div id="c10" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>10</b></div>
<div id="c11" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>11</b></div>
<div id="c12" class="num" style="position:absolute;left:20;top:-20; z-index:5;font-size:11px;"><b>12</b></div>
<div id="ob0" class="num" style="position:absolute;left:-20;top:-20;z-index:1">
</div>
<div id="ob1" class="num" style="position:absolute;left:-20;top:-20;z-index:8">
<font size="+3" color="#0000ff"><b>.</b></font></div>
<div id="ob2" class="num" style="position:absolute;left:-20;top:-20;z-index:8">
<font size="+3" color="#0000ff"><b>.</b></font></div>
<div id="ob3" class="num" style="position:absolute;left:-20;top:-20;z-index:8">
<font size="+3" color="#0000ff"><b>.</b></font></div>
<div id="ob4" class="num" style="position:absolute;left:-20;top:-20;z-index:8">
<font size="+3" color="#0000ff"><b>.</b></font></div>
<div id="ob5" class="num" style="position:absolute;left:-20;top:-20;z-index:8">
<font size="+3" color="#0000ff"><b>.</b></font></div>
<div id="ob6" class="num" style="position:absolute;left:-20;top:-20;z-index:7">
<font size="+3" color="#00ffff"><b>.</b></font></div>
<div id="ob7" class="num" style="position:absolute;left:-20;top:-20;z-index:7">
<font size="+3" color="#00ffff"><b>.</b></font></div>
<div id="ob8" class="num" style="position:absolute;left:-20;top:-20;z-index:7">
<font size="+3" color="#00ffff"><b>.</b></font></div>
<div id="ob9" class="num" style="position:absolute;left:-20;top:-20;z-index:7">
<font size="+3" color="#00ffff"><b>.</b></font></div>
<div id="ob10" class="num" style="position:absolute;left:-20;top:-20;z-index:6">
<font size="+3" color="#ffff00"><b>.</b></font></div>
<div id="ob11" class="num" style="position:absolute;left:-20;top:-20;z-index:6">
<font size="+3" color="#ffff00"><b>.</b></font></div>
<div id="ob12" class="num" style="position:absolute;left:-20;top:-20;z-index:6">
<font size="+3" color="#ffff00"><b>.</b></font></div>
</body>
</html>
<!-- END Script Size: 5.93 KB -->
نویسنده : علی مهاجر
ساعت و تاریخ در نوار
وضعیت
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Francis Woodhouse (francis@contessa.u-net.com) -->
<!-- Begin
function runClock() {
theTime = window.setTimeout("runClock()", 1000);
var today = new Date();
var display= today.toLocaleString();
status=display;
}
// End -->
</SCRIPT>
<!-- CONTINUE -->
<body onLoad="runClock()">
<!-- END Script Size: 0.81 KB -->
نویسنده : علی مهاجر
یک ساعت کامپیوتری
ساده
<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."
document.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" BGCOLOR="000080"
TEXT="ffffff">
<CENTER><form name="clock" onSubmit="0">
<input type="text" name="face" size=13 value=""></CENTER>
نویسنده : علی مهاجر
ساعتی
ساده با قابلیت نشان دادن مدت زمانی که کاربر در سایت یا وبلاگ شماست به این صورت
که روی ساعت باید کلیک شود 1
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<SCRIPT lang=JavaScript>
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;
document.form.button.value = time;
setTimeout('clock()', 1000);
}
function timeInfo() {
milliSince = miNow;
milliNow = miNow - miVisit;
secsVisit = Math.round(milliNow / 1000);
minsVisit = Math.round((milliNow / 1000) / 60);
alert(" الان عزيزم " + minsVisit + " دقيقه هست كه اينجايي خسته كه نشدي؟ "
+ secsVisit + "");
}
document.write("<form name=\"form\">"
+ "<input type=button style='cursor=help' style='border=blue' style='height=20' style='background=#000099' style='color=white' value=\"Click for info!\""
+ " name=button onClick=\"timeInfo()\"></form>");
onError = null;
clock();
</SCRIPT></body>
</html>
</body>
</html>
نویسنده : علی مهاجر
ساعتی
ساده با قابلیت نشان دادن مدت زمانی که کاربر در سایت یا وبلاگ شماست به این صورت
که روی ساعت باید کلیک شود 2
<table border="0" width="200" cellspacing="0" cellpadding="3">
<form name="where">
<tr>
<td width="100%">
<select name="city" size="1" onchange="updateclock(this);">
<option value="" selected>Local time</option>
<option value="0">London GMT</option>
<option value="1">Rome</option>
<option value="7">Bangkok</option>
<option value="8">Hong Kong</option>
<option value="9">Tokyo</option>
<option value="10">Sydney</option>
<option value="12">Fiji</option>
<option value="-10">Hawaii</option>
<option value="-8">San Francisco</option>
<option value="-5">New York</option>
<option value="-3">Buenos Aires</option>
</select>
</td>
</tr>
<tr>
<td width="100%">
<script language="JavaScript">
/*
Drop Down World Clock- By Learn iran (http://www.learniran.com)
Portions of code by Kurt @ http://www.learniran.com/
This credit notice must stay intact
*/
if (document.all||document.getElementById)
document.write('<span id="worldclock" style="font:bold 16px Arial;"></span><br>')
zone=0;
isitlocal=true;
ampm='';
function updateclock(z){
zone=z.options[z.selectedIndex].value;
isitlocal=(z.options[0].selected)?true:false;
}
function WorldClock(){
now=new Date();
ofst=now.getTimezoneOffset()/60;
secs=now.getSeconds();
sec=-1.57+Math.PI*secs/30;
mins=now.getMinutes();
min=-1.57+Math.PI*mins/30;
hr=(isitlocal)?now.getHours():(now.getHours() + parseInt(ofst)) + parseInt(zone);
hrs=-1.575+Math.PI*hr/6+Math.PI*parseInt(now.getMinutes())/360;
if (hr < 0) hr+=24;
if (hr > 23) hr-=24;
ampm = (hr > 11)?"PM":"AM";
statusampm = ampm.toLowerCase();
hr2 = hr;
if (hr2 == 0) hr2=12;
(hr2 < 13)?hr2:hr2 %= 12;
if (hr2<10) hr2="0"+hr2
var finaltime=hr2+':'+((mins < 10)?"0"+mins:mins)+':'+((secs < 10)?"0"+secs:secs)+' '+statusampm;
if (document.all)
worldclock.innerHTML=finaltime
else if (document.getElementById)
document.getElementById("worldclock").innerHTML=finaltime
else if (document.layers){
document.worldclockns.document.worldclockns2.document.write(finaltime)
document.worldclockns.document.worldclockns2.document.close()
}
setTimeout('WorldClock()',1000);
}
window.onload=WorldClock
//-->
</script>
<!--Place holder for NS4 only-->
<ilayer id="worldclockns" width=100% height=35><layer id="worldclockns2" width=100% height=35 left=0 top=0 style="font:bold 16px Arial;"></layer></ilayer>
<p>
</td>
</form>
</tr>
</table>
نویسنده : علی مهاجر
یک ساعت
کامپیوتری بدون تاریخ در نوار وضعیت
<html>
<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."
window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock () {
stopclock();
showtime();
}
</script>
</head>
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080"
onLoad="startclock()">
</body>
</html>
نویسنده : علی مهاجر
این هم پایان
کدها
FINISH
به من لینک دهید
HTTP://BADBOYS05.MIHANBLOG.COM
DESING BY : ALI MOHAJER