دیدم اگه بخوام همش برنامه و ترفند و موبایل بذارم یه کم کسل کننده است . برای همین تصمیم گرفتم یه چند تا کد جاوا بزارم.
سلام
بعد از یه ماه بالاخره گفتم بذار یه چند تا کد جاوا بذارم که یه کم از یهنواختی در بیاد.اینم چند تا کد جاوا
این کد افکت جدیدی برای نوشته های شما است.
<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.javaman.blogfa.com</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></body> </html>
این کد یک گالری عکس باحال براتون درست می کنه.این گالری به این صورت هست که شما لینک عکساتون رو در داخل ایمیج ها قرار داده(لیست) بعد متقاضی با کلیک شما عکس یا موضوع عکس رو انتخاب میکنه بعد بایک دکمه عکس در یک کادر نمایش داده می شود.
<!-- 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>
کد ساعت عقربه ای جدید.
</SCRIPT> <SCRIPT language=JavaScript> fCol='444444'; //face colour. sCol='FF0000'; //seconds colour. mCol='444444'; //minutes colour. hCol='444444'; //hours colour. Ybase=30; //Clock height. Xbase=30; //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='444444'; //face colour. sCol='FF0000'; //seconds colour. mCol='444444'; //minutes colour. hCol='444444'; //hours colour. Ybase=30; //Clock height. Xbase=30; //Clock width. </body> </html> <p align="center"><a href="http://www.javaman.blogfa.com"> <font face="Tahoma" size="2">webloger site</font></a></p>
این کد باعث می شه در هنگام ورود و خروج بازدید کننده به او پیغامی بگوئید.
<html> <head> <title>onLoad and onUnload Example</title> </head> <body onLoad="window.alert('Hello, and welcome to this page.');" onUnload="window.alert('You unloaded the page. Goodbye!');"> <p> </p> </body> </html> </body> </html>
امکان پخش موزیک در وبلاگ وفوق العاده باحاله.
<font face="Tahoma" size="2" color="#000000"> <object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer1" width="150" height="45"> <param name="URL" ref value="http://www.asemani.org/parsplanet.asx"> <param name="rate" value="1"> <param name="balance" value="0"> <param name="currentPosition" value="0"> <param name="defaultFrame" value> <param name="playCount" value="1"> <param name="autoStart" value="-1"> <param name="currentMarker" value="0"> <param name="invokeURLs" value="-1"> <param name="baseURL" value> <param name="volume" value="50"> <param name="mute" value="0"> <param name="uiMode" value="full"> <param name="stretchToFit" value="0"> <param name="windowlessVideo" value="0"> <param name="enabled" value="-1"> <param name="enableContextMenu" value="-1"> <param name="fullScreen" value="0"> <param name="SAMIStyle" value> <param name="SAMILang" value> <param name="SAMIFilename" value> <param name="captioningID" value> <param name="enableErrorDialogs" value="0"> </object></font></body> <!-- DESCRIPTION: This will make the browser jump to the page of your choice once the user puts the mouse over the link. INSTRUCTIONS: Place this code in your webpage. Use the model given to modify your own links. Can be used with an Image or simply use text. FUNCTIONALITY: Works in both Netscape & 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. --> <font face="ARIAL" color="#804000" size="2"> <a target="main" onmouseover="window.open ('http://www.JAVAMAN.BLOGFA.COM/');" style="text-decoration: none" href="http://javaman.blogfa.com"> javaman.blogfa.com</a></font><P align="center"> </html></body> </html>
این جاوا برای کسایی است که جا کم دارن.شما با استفاده از این کد میتوانید صفحه ای مجزا داشته باشید ودر آن متنی رو بدون گرفتن جا درج کنید.
<!-- START OF Scrollable Embedded Window DHTML --> <!-- SUMMARY BRIEF This DHTML script will put a small, fixed, scrollable window into your page. You can change the height, width, background color and content of the window. How to configure the script: The width of the "window" is 170 and the height is 150. To alter the height and width of the window, change ALL instances of 170 to another value, and the same for 150 (it'll be faster if you just do a search-and-replace). You can also give the window a different background color by changing "white" to another color name or hex code. Also, change the text to whatever you want by replacing the text (you can use HTML as well) inside of the <DIV> tag. --> <!-- Put this code into your page wherever you want the small window to be. --> <ilayer name="scroll1" width=170 height=150 clip="0,0,170,150"> <layer name="scroll2" width=170 height=150 bgColor="white"> <div id="scroll3" style="width:170;height:150;background-color:yellow;overflow:scroll"> ??? ??? ?? ?? ?ی? ???? ???ی???<br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> </div> </layer> </ilayer> <script> var nsstyle='display:""' if (document.layers) var scrolldoc=document.scroll1.document.scroll2 function up(){ if (!document.layers) return if (scrolldoc.top<0) scrolldoc.top+=10 temp2=setTimeout("up()",50) } function down(){ if (!document.layers) return if (scrolldoc.top-150>=scrolldoc.document.height*-1) scrolldoc.top-=10 temp=setTimeout("down()",50) } function clearup(){ if (window.temp2) clearInterval(temp2) } function cleardown(){ if (window.temp) clearInterval(temp) } </script> <br><span style="display:none" style=&{nsstyle};><a href="#" onMousedown="up()" onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a href="#" onMousedown="down()" onMouseup="cleardown()" onClick="return false" onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span> <!-- END OF Scrollable Embedded Window DHTML -->
جواب: این یه کد جاواست که با فرمت های مختلفی هم میشه این کارو کرد. اول باید آهنگ رو آپلود کرد(چند تا آپلود سنتر سمت چپ هست) . بعد کد جاوا رو باید در قسمت ویرایش قالب کپی کرد(البته بهتره در آخر کپی کنیم) .باید آدرس فایل کپی شده رو در قشمتی که تو کد جاوا مشخص شده بزاریم .اینم کدهای جاوا واسه آهنگ گزاری در ابتدای وبلاگ
كد قرار دادن آهنگ با پسوند هاي Mid و Wave در پس زمينه وب بدون ديده شدن كنترل مدريت آهنگ . يعني بازديد كننده قادر به قطع و صل آن نمي باشد .
<!-- Start --- http://www.iroweb.com --> <bgsound src="آدرس آهنگ" loop="-1"> <!-- End --- http://www.iroweb.com --></body> </html> </body> </html>
ترفند تاپ
اين كدها تمام تبليغاتي را كه سرويس هاي رايگان براي وبلاگهاي در حال باز شدن آماده كرده شده اند را از بين مي برد و موجب مي شود كه هيچ تبليغاتي زماني كه وبلاگ شما در حال باز شدن است به نمايش در نيايد . اين كدها را لطفا در ابتداي ويرايش قالب وبلاگ خود اضافه كنيد
<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="1" color="gray">macromediax</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="1" color="gray">macromediax</font></td></tr></table>' } catch (e) {} } setInterval('removeAdv()',1000); </script>
<!----Www.Dlisladn.Com---> <!-- 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 --> <!----Www.Dlisladn.Com--->
<!----Www.Dlisladn.Com---> <SCRIPT language=JavaScript1.2> //Disable select-text script (IE4+, NS6+) //Exclusive permission granted to Dynamic Drive to feature script 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> <!----Www.Dlisladn.Com--->
نمایش اطلاعات بازدیدکننده در وبلاگ یا سایت شما
<!-- Start code --- http://www.Dlisland.com --> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" style="border:1px dotted #808080; border-collapse: collapse" bordercolor="#111111" width="21%" bgcolor="#EEEEEE" height="120"> <tr> <td width="100%" height="109"> <p align="justify"> </script> <P align=center dir="rtl" style="margin-bottom: -10"> <fomt face=tahoma> <font face="Tahoma" style="font-size: 9pt; ">اطلاعات شما :</font></P> <P dir="rtl" style="margin-bottom: 0; margin-right:3"> <font color="#808080" face="Tahoma" style="font-size: 9pt"> <SCRIPT language=JavaScript> <!-- Begin var xy = navigator.appVersion; xz = xy.substring(22,25); document.write("مرورگر: ", navigator.appName,"<br><br>"); document.write("نگارش: ",xz,"<br><br>"); document.write("وضوح نمایشگر: ",screen.width," در ",screen.height,"<br><br>"); if (navigator.javaEnabled()) document.write("جاوا: فعال"); // End --> </SCRIPT> </font> </td></tr><tr> <td width="100%" height="11"> <font face="Tahoma" color="#C0C0C0"><b> <span style="font-size: 7pt" lang="en-us"> <a target="_blank" href="http://www.ljava.mihanblog.com" style="text-decoration: none"> <font color="#C0C0C0"> @ Ljava.mihanblog.com</font></a></span></b></font></td></tr> </table> </center> </div> <!-- End code --- http://www.badboys05.mihanblog.com -->
انتقال کاربر از يک سايت به سايت ديگر به صورت زمان دار
<!----Www.Dlisladn.Com---> <p align="center"><b><font size="7" color="#800000">لطفا صبر کنید<form name="redirect"> <center> <p></p> <form> <input type="text" size="3" name="redirect2"> </form> </b></font> </center> <script> <!-- var targetURL="http://badboys05.mihanblog.com " var countdownfrom=10 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> <!----Www.Dlisland.Com--->