نکته : کدها را در تگ بادی کپی کنید
کد روشن شدن متن
کد HTML:
<**** http-equiv=”Content-Language” content=”en-us”>
<h2>
<script language=”JavaScript1.2″>
/*
Neon Lights Text
*/
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.myweblog.com/”>webloger site</a></font></p>
کد حرکت متن
کد HTML:
<!– 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 –>
<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 –>
[RIGHT] [/RIGHT]
کد نمایش متن به دنبال موس
کد HTML:
<!– START OF Mouse Cursor Text Trailer DHTML –>
<!– SUMMARY BRIEF
This DHTML script will make a text message follow
your cursor around the screen. You can change the
message to say whatever you want.
You can change the font face, color and size in
the .trailersytle tag below. You can change the message
in the javascript below that. Just look for the
comment that says “Insert your personal message below.”
–>
<!– Put this portion of the script inside of your <HEAD> tag –>
<style>
.trailerstyle {
position: absolute;
visibility: visible;
top: -50px;
font-size: 12px;
font-family: Arial,Helvetica,Verdana;
font-weight: bold;
color: #000000;
}
</style>
<script>
<!–
var x,y
var step=20
var flag=0
// Insert your personal message below.
// Important: Do NOT remove the space at the end of the sentence!!!
var message=” www.My Weblog.com “
message=message.split(”")
var xpos=new Array()
for (i=0;i<=message.length-1;i++) {
xpos[i]=-50
}
var ypos=new Array()
for (i=0;i<=message.length-1;i++) {
ypos[i]=-50
}
function handlerMM(e){
x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
flag=1
}
function mousetrailer() {
if (flag==1 && document.all) {
for (i=message.length-1; i>=1; i–) {
xpos[i]=xpos[i-1]+step
ypos[i]=ypos[i-1]
}
xpos[0]=x+step
ypos[0]=y
for (i=0; i<message.length-1; i++) {
var thisspan = eval(”span”+(i)+”.style”)
thisspan.posLeft=xpos[i]
thisspan.posTop=ypos[i]
}
}
else if (flag==1 && document.layers) {
for (i=message.length-1; i>=1; i–) {
xpos[i]=xpos[i-1]+step
ypos[i]=ypos[i-1]
}
xpos[0]=x+step
ypos[0]=y
for (i=0; i<message.length-1; i++) {
var thisspan = eval(”document.span”+i)
thisspan.left=xpos[i]
thisspan.top=ypos[i]
}
}
var timer=setTimeout(”mousetrailer()”,30)
}
//–>
</script>
<!– Put this code inside of your <BODY> tag. –>
<script>
<!–
for (i=0;i<=message.length-1;i++) {
document.write(”<span id=’span”+i+”‘ class=’trailerstyle’>”)
document.write(message[i])
document.write(”</span>”)
}
if (document.layers){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;
//–>
</script>
<!– Lastly, insert the following into the <BODY> tag, itself, just like the example that follows. –>
example:
<body onLoad=”mousetrailer()” style=”width:100%;overflow-x:hidden;overflow-y:scroll”>
<!– END OF Mouse Cursor Text Trailer DHTML –>
آهنگ در وبلاگ یا سایت
در ضمن برای تغییر آهنگ می تونید مسیر آهنگ را تغیبر بدید
کد HTML:
<bgsound src=”http://www.eydat.com/k/music.mid” loop=”-1″>
<p><font face=”Tahoma” style=”font-size: 8pt”><span lang=”fa”>
<a target=”_blank” href=”http://www.myweblog.com/”>کدهای جاوا</a></span></font></p>
یک تقویم زیبا
کد HTML:
<!– 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>
<**** name=”GENERATOR” content=”Microsoft FrontPage 6.0″>
<**** 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 –>
موفق باشید
بوک مارک ها