تبليغاتX
...دانستنیهای علمی ، موبایل ،کامپیوتر و
توجه : بعضی از کدها را نمی تونید با هم استفاده کنید . مثلا از کدهای "تغيير رنگ درون باکس" و "پرسيدن رنگ زمينه و نوشته ها" و "تغییر رنگ بک گراند" رو نمی تونید با هم استفاده کنید و باید یکی رو انتخاب کنید وگرنه هیچ کدوم کار نمی کنه .

نکته ی خیلی مهم

کدهایی را که می خواهید استفاده کنید بین تگ بادی کپی کنید

آموزش ساده استفاده از کدهای جاوا اسکریپت :


بین همین 2 تگ بادی کد مورد نظر را کپی کنید





برای امتحان کردن کدها یه راه ساده وجود داره :
1 وارد Notepad شوید .
2 در صفحه Notepad کدهای زیر را وارد کنید .





3 بین دو تگ و هر کدوم از کدهای گفته شده را که خواستید وارد کنید .
4 صفحه را با پسوند html ( مثلا example.html ) ذخیره کنید . قبل از ذخیره کردن مطمئن شوید که save as type روی حالت All Files باشد .
5 رو فایلی که درست کردید دبل کلیک کنید و نتیجه رو ببینید .


با این کد میتونید همراه با باز شدن وبلاگتون صفحه دیگه ای هم باز کنید در جایی که نوشته شده your title باید عنوان سایت یا وبلاگتون رو بذارید و در جایی که نوشته your site آدرس سایتتون یا وبلاگتون رو وارد کنید و در قسمت your text جمله خودتون رو و در قسمت your mail ایمیلتون رو و در قسمت http://your site.com آدرس وبلاگ یا سایتتون رو و درست جلوش در قسمت your name site اسم سایتتون رو بنویسید.

<SCRIPT LANGUAGE="JavaScript">
<!--
coffeeWin=window.open("","coffeeWin","toolbar=no,width=500,height=500,directories=no,men ubar=no,SCROLLBARS=yes");
coffeeWin.document.write("<HTML>");
coffeeWin.document.write("<HEAD>");
coffeeWin.document.write("<title>your title</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>your site</FONT>");
coffeeWin.document.write("<BR><HR WIDTH=180><BR><P>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("your text");
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("your mail");
coffeeWin.document.write("<BR><HR WIDTH=180><BR><P>");
coffeeWin.document.write("<A HREF=http://your site.com TARGET=MAIN>your name site</A>");
coffeeWin.document.write("</B>");
coffeeWin.document.write("</FONT>");
coffeeWin.document.write("</BODY>");
coffeeWin.document.write("</HTML>");
//-->
</SCRIPT></body>
</html>

کد زیر هم خیلی قشنگه چند جرقه رو بوجود میاره که وقتی ماوس حرکت میکنه روشن میشن

<STYLE TYPE="text/css">
<!--

BODY{
overflow:scroll;
overflow-x:hidden;
}

.s1
{
position : absolute;
font-size : 10pt;
color : blue;
visibility: hidden;
}

.s2
{
position : absolute;
font-size : 18pt;
color : red;
visibility : hidden;
}

.s3
{
position : absolute;
font-size : 14pt;
color : gold;
visibility : hidden;
}

.s4
{
position : absolute;
font-size : 12pt;
color : lime;
visibility : hidden;
}

//-->
</STYLE>


<DIV ID="div1" CLASS="s1">*</DIV>
<DIV ID="div2" CLASS="s2">*</DIV>
<DIV ID="div3" CLASS="s3">*</DIV>
<DIV ID="div4" CLASS="s4">*</DIV>

<p align="center">
<font face="arial, helvetica" size="-2"><a
Kit</a></font></p>

<SCRIPT LANGUAGE="javascript" TYPE="text/javascript">



var nav = (document.layers);
var tmr = null;
var spd = 50;
var x = 0;
var x_offset = 5;
var y = 0;
var y_offset = 15;

if(nav) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = get_mouse;

function get_mouse(e)
{
x = (nav) ? e.pageX : event.clientX+document.body.scrollLeft;
y = (nav) ? e.pageY : event.clientY+document.body.scrollTop;
x += x_offset;
y += y_offset;
beam(1);
}

function beam(n)
{
if(n<5)
{
if(nav)
{
eval("document.div"+n+".top="+y);
eval("document.div"+n+".left="+x);
eval("document.div"+n+".visibility='visible'");
}
else
{
eval("div"+n+".style.top="+y);
eval("div"+n+".style.left="+x);
eval("div"+n+".style.visibility='visible'");
}
n++;
tmr=setTimeout("beam("+n+")",spd);
}
else
{
clearTimeout(tmr);
fade(4);
}
}

function fade(n)
{
if(n>0)
{
if(nav)eval("document.div"+n+".visibility='hidden'");
else eval("div"+n+".style.visibility='hidden'");
n--;
tmr=setTimeout("fade("+n+")",spd);
}
else clearTimeout(tmr);
}

// -->
</SCRIPT>







کد زیر باعث میشه که متن انتخابیه شما به دور ماوس بیاد و دورش بچرخه . قسمتی که نوشته well come to my weblog را شما میتونید عوض کنید .


<head>
<meta http-equiv="Content-Language" content="en-us">
</head>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
if (document.all) {
//Things you can alter
yourLogo = "wellcome 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>






+ نوشته شده توسط امیر آیدین آتشی در دوشنبه بیست و ششم شهریور 1386 و ساعت 11:0 بعد از ظهر |
با اين کد يک پروانه در وبلاگ خود داشته باشيد اين پروانه به دنبال موس بازديد کننده سايت يا وبلاگ شما حرکت ميکند .

<script language="JavaScript">
//Static analog Clock by kurt.grigg@virgin.net
//Script featured on JavaScript Kit
//http://javascriptkit.com

fCol='white';//face colour.
sCol='yellow';//seconds colour.
mCol='white';//minutes colour.
hCol='white';//hours colour.

H='....';
H=H.split('');
M='.....';
M=M.split('');
S='......';
S=S.split('');
Ypos=0;
Xpos=0;
Ybase=8;
Xbase=8;
dots=12;
ns=(document.layers)?1:0;
if (ns){
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,Verdana 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>');
}
}
else{
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;heig ht:30px;font-family:Arial,Verdana;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></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 (ns){
Ypos=window.pageYOffset+window.innerHeight-60;
Xpos=window.pageXOffset+window.innerWidth-80;
}
else{
Ypos=document.body.scrollTop+window.document.body. clientHeight-60;
Xpos=document.body.scrollLeft+window.document.body .clientWidth-60;
}
if (ns){
for (i=0; i < dots; ++i){
document.layers["nsDigits"+i].top=Ypos-5+40*Math.sin(-0.49+dots+i/1.9);
document.layers["nsDigits"+i].left=Xpos-15+40*Math.cos(-0.49+dots+i/1.9);
}
for (i=0; i < S.length; i++){
document.layers["nx"+i].top=Ypos+i*Ybase*Math.sin(sec);
document.layers["nx"+i].left=Xpos+i*Xbase*Math.cos(sec);
}
for (i=0; i < M.length; i++){
document.layers["ny"+i].top=Ypos+i*Ybase*Math.sin(min);
document.layers["ny"+i].left=Xpos+i*Xbase*Math.cos(min);
}
for (i=0; i < H.length; i++){
document.layers["nz"+i].top=Ypos+i*Ybase*Math.sin(hrs);
document.layers["nz"+i].left=Xpos+i*Xbase*Math.cos(hrs);
}
}
else{
for (i=0; i < dots; ++i){
ieDigits[i].style.pixelTop=Ypos-15+40*Math.sin(-0.49+dots+i/1.9);
ieDigits[i].style.pixelLeft=Xpos-14+40*Math.cos(-0.49+dots+i/1.9);
}
for (i=0; i < S.length; i++){
x[i].style.pixelTop =Ypos+i*Ybase*Math.sin(sec);
x[i].style.pixelLeft=Xpos+i*Xbase*Math.cos(sec);
}
for (i=0; i < M.length; i++){
y[i].style.pixelTop =Ypos+i*Ybase*Math.sin(min);
y[i].style.pixelLeft=Xpos+i*Xbase*Math.cos(min);
}
for (i=0; i < H.length; i++){
z[i].style.pixelTop =Ypos+i*Ybase*Math.sin(hrs);
z[i].style.pixelLeft=Xpos+i*Xbase*Math.cos(hrs);
}
}
setTimeout('clock()',50);
}
if (document.layers || document.all) window.onload=clock;
//-->
</script>
<!-- 10-30am LiveCounter CUSTOM MENU code - BEGIN -->
<SCRIPT><!--
var ButterflyMenu=new Array();
//--></SCRIPT>
<!-- 10-30am LiveCounter CUSTOM MENU code - END -->
<!-- 10-30am LiveCounter code (c) copyright 2001, 10-30am team -->
<SCRIPT SRC="http://www.softwarewings.com/cgi-bin/livecounter.cgi?cntr=Active&nm=saba5&pg=default">
</SCRIPT>
<!-- 10-30am LiveCounter code ends here -->



<p align="center" dir="rtl" style="font size:8pt;">

</p>
<br>



خوب اين کد رو هر کجايی دلتون خواست بزاريد منظورم هر کجای ويرايش قالب صفحه اصلی هست ولی برای اينکه قالب به هم نريزه در اخر قالب بزارينش
کد زیر باعث میشه که یک لینکدونیه کشویی با کلیک بوجود بیاد . در قسمتهایی که نوشته blog name باید اسم بلاگ و در قسمتی که نوشته blog adress باید آدرس بلاگ را بنویسید ------ برای اضافه کردن لینک یک اینتر به آخرین خط جایی که لینک هاتو وارد میکنی بزن و کدهای بالا رو کپی کن و آدرس و اسم رو بده .

<CENTER>
<FORM>

<SELECT NAME="list">
<OPTION SELECTED>linkestan
<option value="adress blog">blogname</option>
<OPTION VALUE="adress blog">blogname
<OPTION VALUE="adress blog">blogname
<option value="adress blog">blogname</option>
</SELECT>

<p>



<INPUT TYPE=BUTTON VALUE="Go Get It!"
onClick="top.location.href=this.form.list.options[this.form.list.selectedIndex].v

alue"> </p>

</FORM>
</CENTER>
ماوس خود را تبديل به هدف گير نماييد. با استفاده از اين کد ميتوانيد ماوس خود را تبديل به يک هدف گير بزرگ بصورت بعلاوه با رنگ قرمز نماييد.

<head>
<meta http-equiv="Content-Language" content="en-us">
<style>
<!--
#leftright, #topdown{
position:absolute;
left:0;
top:0;
width:1px;
height:1px;
layer-background-color:red;
background-color:red;
z-index:100;
font-size:1px;
}
--></style>
</head>

<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+e vent.clientY+1
topdown.style.pixelTop=document.body.scrollTop
if (event.clientX<document.body.clientWidth-2)
topdown.style.pixelLeft=document.body.scrollLeft+e vent.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)
window.onload=regenerate2
//-->
</script>
<p align="center"><b><a target="_blank" href="http://explorer.blogsky.com">
explorer blog</a></b></p>
</body>
</html>
</body>
</html>
</body>
</html>
</body>
</html>
کد زیر دما و ساعت تهران رو نشون میده.

<hr color="White">
<PRE>
<A href="http://www.wunderground.com/global/stations/40754.html">
<IMG height=41 alt=" Tehran Forecast" src="http://banners.wunderground.com/banner/gizmotimetemp_both/language/www/global/stations/40754.gif" width=127 align="center"></A>
</PRE>

<p><br></body>
</html>
+ نوشته شده توسط امیر آیدین آتشی در جمعه نهم شهریور 1386 و ساعت 4:48 بعد از ظهر |
>

explorer blog

--------------------------------------------------------------------------------