قرار دادن جستجوگر کلمه در سایت<!-- START OF Find In Page Form DHTML --> <!-- SUMMARY BRIEF This DHTML script mimics the Find (Ctrl+F) feature in your browser. It will look in the current page for whatever text the user inputs. If it finds the text, it hilights the text so the user can see it. If it doesn't find the text, it pops up a javascript alert stating that the text was not found on the current page. --> <!-- Put this portion of the script inside of your <HEAD> tag --> <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("Not found."); } } return false; } </script> <!-- Put this code into your page where you want the search form to appear. --> <form name="search" onSubmit="return findInPage(this.string.value);"> <font size=3><input name="string" type="text" size=15 onChange="n = 0;"></font> <input type="submit" value="Find"> </form> <!-- END OF Find In Page Form DHTML --></body> </html>
نمایش لینک به صورت منویی<!-- START OF Slide Out DHTML --> <!-- SUMMARY BRIEFS This DHTML script is an entire webpage by itself. Open it up into a blank webpage and try it out. You can then add your content around it. Basically, you can have 5 different "layers" which switch when the user clicks on the appropriate links. You can adjust the links, colors, and text below. IMPORTANT This example has an image. It is found in the CoffeeCup Software folder on your hard drive. --> <SCRIPT LANGUAGE="JavaScript"> <!-- n = (document.layers) ? 1:0 ie = (document.all) ? 1:0 function init() { slideoutActive = 0 if (n) { slideout1 = document.slideoutInterface.document.slideoutContent.document.slideoutContent1 slideout2 = document.slideoutInterface.document.slideoutContent.document.slideoutContent2 slideout3 = document.slideoutInterface.document.slideoutContent.document.slideoutContent3 slideout4 = document.slideoutInterface.document.slideoutContent.document.slideoutContent4 slideout5 = document.slideoutInterface.document.slideoutContent.document.slideoutContent5 } if (ie) { slideout1 = slideoutContent1.style slideout2 = slideoutContent2.style slideout3 = slideoutContent3.style slideout4 = slideoutContent4.style slideout5 = slideoutContent5.style } slideoutShown = slideout1 slideoutShown.xpos = 0 slideoutNew = "none" slideoutNew.xpos = -285 } function slideout(which) { if (!slideoutActive && slideoutShown != which) { slideoutActive = 1 slideoutNew = which slideoutNew.xpos = -285 slideoutLeft() } } function slideoutLeft() { if (slideoutShown.xpos > -285) { slideoutShown.xpos -= 15 slideoutShown.left = slideoutShown.xpos setTimeout("slideoutLeft()",30) } else { hide(slideoutShown) show(slideoutNew) setTimeout("slideoutRight()",50) } } function slideoutRight() { if (slideoutNew.xpos < 0) { slideoutNew.xpos += 15 slideoutNew.left = slideoutNew.xpos setTimeout("slideoutRight()",30) } else { slideoutShown = slideoutNew slideoutActive = 0 // stops the sequence } } function show(showobj) { if (n) showobj.visibility = "show" if (ie) showobj.visibility = "visible" } function hide(hideobj) { if (n) hideobj.visibility = "hide" if (ie) hideobj.visibility = "hidden" } //--> </SCRIPT> <STYLE TYPE="text/css"> <!-- A {color:#000000; font-family:'Arial'; font-weight:bold; font-size:10pt; text-decoration:none; line-height:20pt;} STRONG {font-family:'Arial'; font-size:15pt; font-weight:bold; line-height:25pt;} P {font-family:'Arial'; font-size:10pt; line-height:13pt;} TD {font-family:'Arial'; font-size:10pt; line-height:13pt;} #slideoutInterface {position:absolute; left:50; top:50; width:400; height:250; clip:rect(0,400,250,0); background-color:#000000; layer-background-color:#000000; visibility:visible;} #slideoutSidebar1 {position:absolute; left:5; top:5; width:100; height:30; clip:rect(0,100,30,0); background-color:#9797FF; layer-background-color:#9797FF;} #slideoutSidebar2 {position:absolute; left:5; top:40; width:100; height:30; clip:rect(0,100,30,0); background-color:#FFFF00; layer-background-color:#FFFF00;} #slideoutSidebar3 {position:absolute; left:5; top:75; width:100; height:30; clip:rect(0,100,30,0); background-color:#FF80C0; layer-background-color:#FF80C0;} #slideoutSidebar4 {position:absolute; left:5; top:110; width:100; height:30; clip:rect(0,100,30,0); background-color:#00FF80; layer-background-color:#00FF80;} #slideoutSidebar5 {position:absolute; left:5; top:145; width:100; height:30; clip:rect(0,100,30,0); background-color:#FF5353; layer-background-color:#FF5353;} #slideoutContent {position:absolute; left:110; top:5; width:285; height:240; clip:rect(0,285,240,0); background-color:#000000; layer-background-color:#000000;} #slideoutContent1 {position:absolute; left:0; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#DEDEDE; layer-background-color:#DEDEDE; visibility:visible;} #slideoutContent2 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#DEDEDE; layer-background-color:#DEDEDE; visibility:hidden;} #slideoutContent3 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#DEDEDE; layer-background-color:#DEDEDE; visibility:hidden;} #slideoutContent4 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#DEDEDE; layer-background-color:#DEDEDE; visibility:hidden;} #slideoutContent5 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#DEDEDE; layer-background-color:#DEDEDE; visibility:hidden;} //--> </STYLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" onLoad="init()"> <DIV ID="slideoutInterface"> <DIV ID="slideoutSidebar1"><P ALIGN=CENTER><A HREF="javascript:slideout(slideout1)">Contact Us</A></P></DIV> <DIV ID="slideoutSidebar2"><P ALIGN=CENTER><A HREF="javascript:slideout(slideout2)">Help</A></P></DIV> <DIV ID="slideoutSidebar3"><P ALIGN=CENTER><A HREF="javascript:slideout(slideout3)">Services</A></P></DIV> <DIV ID="slideoutSidebar4"><P ALIGN=CENTER><A HREF="javascript:slideout(slideout4)">Products</A></P></DIV> <DIV ID="slideoutSidebar5"><P ALIGN=CENTER><A HREF="javascript:slideout(slideout5)">Order</A></P></DIV> <DIV ID="slideoutContent"> <DIV ID="slideoutContent1"> <P ALIGN="CENTER"><STRONG>Contact Us</STRONG> <P> <TABLE BORDER=0 WIDTH=275><TD> You can add <A HREF="http://www.webloger.5u.com"><FONT COLOR=BLUE>Links</FONT></A>. <P> Or images: <IMG SRC="smile.gif" BORDER=0 HEIGHT=11 WIDTH=11> <P> Or just use text to explain what you have or what you are doing. </TD></TABLE> </P> </DIV> <DIV ID="slideoutContent2"> <P ALIGN="CENTER"><STRONG>Help</STRONG> <P> <TABLE BORDER=0 WIDTH=275><TD> You can add <A HREF="http://www.webloger.5u.com"><FONT COLOR=BLUE>Links</FONT></A>. <P> Or images: <IMG SRC="smile.gif" BORDER=0 HEIGHT=11 WIDTH=11> <P> Or just use text to explain what you have or what you are doing. </TD></TABLE> </P> </DIV> <DIV ID="slideoutContent3"> <P ALIGN="CENTER"><STRONG>Services</STRONG> <P> <TABLE BORDER=0 WIDTH=275><TD> You can add <A HREF="http://www.webloger.5u.com"><FONT COLOR=BLUE>Links</FONT></A>. <P> Or images: <IMG SRC="smile.gif" BORDER=0 HEIGHT=11 WIDTH=11> <P> Or just use text to explain what you have or what you are doing. </TD></TABLE> </P> </DIV> <DIV ID="slideoutContent4"> <P ALIGN="CENTER"><STRONG>Products</STRONG> <P> <TABLE BORDER=0 WIDTH=275><TD> You can add <A HREF="http://www.webloger.5u.com"><FONT COLOR=BLUE>Links</FONT></A>. <P> Or images: <IMG SRC="smile.gif" BORDER=0 HEIGHT=11 WIDTH=11> <P> Or just use text to explain what you have or what you are doing. </TD></TABLE> </P> </DIV> <DIV ID="slideoutContent5"> <P ALIGN="CENTER"><STRONG>Order</STRONG> <P> <TABLE BORDER=0 WIDTH=275><TD> You can add <A HREF="http://www.webloger.5u.com"><FONT COLOR=BLUE>Links</FONT></A>. <P> Or images: <IMG SRC="smile.gif" BORDER=0 HEIGHT=11 WIDTH=11> <P> Or just use text to explain what you have or what you are doing. </TD></TABLE> </P> </DIV> </DIV> </BODY> </HTML> <!-- END OF Slide Out DHTML -->
یک منو بسیار زیبا<!-- START OF Drop Down DHTML --> <!-- SUMMARY BRIEFS This DHTML script will create a drop down link box out of an ordinary link. VERY COOL!!!! The top portion of this script goes above the <BODY> tag. The second portion goes where you want the drop down link box to be. --> <style> <!-- #wrapper{ position:relative; height:30px } #wrapper2{ position:absolute } #coffeemenu03{ filter:revealTrans(Duration=1.5,Transition=12) visibility:hide } --> </style></HEAD> <BODY> <ilayer id="coffeemenu01" height=35px> <layer id="coffeemenu02" visibility=show> <span id="wrapper"> <span id="wrapper2" onClick="dropit2();event.cancelBubble=true;return false"> <font face="Verdana"><b><a href="notthisbrowser.html">Click Here To Navigate</a></b></font> </span> </span> </layer> </ilayer> <script language="JavaScript1.2"> var enableeffect=true var selection=new Array() selection[0]='<font face="ARIAL BLACK"><a href="http://www.webloger.5u.com">Order Our Stuff</a><br>' selection[1]='<a href="http://www.webloger.5u.com">Contact Us via E-mail</a><br>' selection[2]='<a href="http://www.webloger.5u.com">Help With Our Items</a><br>' selection[3]='<a href="http://www.webloger.5u.com">Products We Have</a><br>' selection[4]='<a href="http://www.webloger.5u.com">Services We Offer</a><br></font>' if (document.layers) document.coffeemenu01.document.coffeemenu02.visibility='show' function dropit2(){ if (document.all){ coffeemenu03.style.left=document.body.scrollLeft+event.clientX-event.offsetX coffeemenu03.style.top=document.body.scrollTop+event.clientY-event.offsetY+18 if (coffeemenu03.style.visibility=="hidden"){ if (enableeffect) coffeemenu03.filters.revealTrans.apply() coffeemenu03.style.visibility="visible" if (enableeffect) coffeemenu03.filters.revealTrans.play() } else{ hidemenu() } } } function dropit(e){ if (document.coffeemenu03.visibility=="hide") document.coffeemenu03.visibility="show" else document.coffeemenu03.visibility="hide" document.coffeemenu03.left=e.pageX-e.layerX document.coffeemenu03.top=e.pageY-e.layerY+19 return false } function hidemenu(){ if (enableeffect) coffeemenu03.filters.revealTrans.stop() coffeemenu03.style.visibility="hidden" } function hidemenu2(){ document.coffeemenu03.visibility="hide" } if (document.layers){ document.coffeemenu01.document.coffeemenu02.captureEvents(Event.CLICK) document.coffeemenu01.document.coffeemenu02.onclick=dropit } else if (document.all) document.body.onclick=hidemenu </script> <div id="coffeemenu03" style="position:absolute;left:0;top:0;layer-background-color:#C0C0C0;background-color:#C0C0C0;width:200;visibility:hidden;border:2px solid black;padding:0px"> <script language="JavaScript1.2"> if (document.all) coffeemenu03.style.padding='4px' for (i=0;i<selection.length;i++) document.write(selection[i]) </script> </div> <script language="JavaScript1.2"> if (document.layers){ document.coffeemenu03.captureEvents(Event.CLICK) document.coffeemenu03.onclick=hidemenu2 } </script> <!-- END OF Drop Down DHTML -->