جافا ـ ازرار
زر ـ رسالة تحذيرية
<!-- ONE STEP TO INSTALL ALERT BUTTON: 1. Paste the coding into the BODY of the HTML document --> <!-- STEP ONE: Copy this code into the BODY of your HTML document --> <BODY> <CENTER> <FORM> <INPUT TYPE="button" VALUE="Click here to be alerted" onClick='alert("أنتبه.")'> </FORM> </CENTER> <p> <font face="arial, helvetica" size="-2"><p>
يخبرك بعدد زوار الصفحه عند الضغط على الزر
<!-- TWO STEPS TO INSTALL FAKE COUNTER: 1. Paste the coding into the HEAD of your HTML document 2. Copy the last coding into the BODY of your HTML document --> <!-- STEP ONE: Copy this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var ran ran = Math.round(Math.random()*50000) function alertUser() { alert("You are visitor number " + ran + " to this page.") } // End --> </SCRIPT> <!-- STEP TWO: Copy this last code into the HEAD of your HTML document --> <BODY> <CENTER> <FORM> <INPUT TYPE="button" VALUE="How many visits?" onClick="alertUser()"> </FORM> </CENTER>
زر ينزلك الى اسفل الصفحة
<!-- TWO STEPS TO INSTALL VERTICAL SCROLL: 1. Paste the coding into the HEAD of your HTML document 2. Add the last code to the BODY of your HTM document --> <!-- STEP ONE: Copy this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function scrollit() { for (I=1; I<=750; I++){ parent.scroll(1,I) } } // End --> </SCRIPT> <!-- STEP TWO: Put this code into the BODY of your HTML document --> <BODY><CENTER><FORM><input type=button value="Scroll Page" onClick="scrollit()"></FORM></CENTER>
لفتح نافذة تدريجيا
<body> <script> <!-- var winheight=100 var winsize=100 var x=5 function openwindow(thelocation){ temploc=thelocation if (!(window.resizeTo&&document.all)&&!(window.resizeTo&&document.getElementById)){ window.open(thelocation) return } win2=window.open("","","scrollbars") win2.moveTo(0,0) win2.resizeTo(100,100) go2() } function go2(){ if (winheight>=screen.availHeight-3) x=0 win2.resizeBy(5,x) winheight+=5 winsize+=5 if (winsize>=screen.width-5){ win2.location=temploc winheight=100 winsize=100 x=5 return } setTimeout("go2()",50) } //--> </script> <center><p><a href="javascript:openwindow('http://www.uaezayed.com')">اكتب النص هنا</a></center> </body>
لفتح كامل النافذه بالضغط على زر
<html> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function openFullscreen(page) { var yes = 1; var no = 0; var menubar = no; // The File, Edit, View Menus var scrollbars = yes; // Horizontal and vertical scrollbars var locationbar = no; // The location box with the site URL var directories = no; // the "What's New", "What Cool" links var resizable = no; // Can the window be resized? var statusbar = no; // Status bar (with "Document: Done") var toolbar = no; // Back, Forward, Home, Stop toolbar windowprops = "width=" + (screen.width-10) + ",height=" + (screen.height-50) + ",top=0,left=0"; windowprops += (menubar ? ",menubars" : "") + (scrollbars ? ",scrollbars" : "") + (locationbar ? ",location" : "") + (directories ? ",directories" : "") + (resizable ? ",resizable" : "") + (statusbar ? ",status" : "") + (toolbar ? ",toolbar" : ""); window.open(page, 'fullPopup', windowprops); } // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <center> <form> <input type=button value="C?U? " onClick="openFullscreen('http://www.sahran.4mg.com');"> </form> </center> </BODY> </html>
نافذة عند خروجك من الصفحه
<HTML> <head> <TITLE>Javascript - Fenêtre de salutations</TITLE> <SCRIPT LANGUAGE="JavaScript"> function salut(){ f=window.open('','','toolbar=no,menubar=no,location=no,left=50,top=50,height=100,width=200'); f.document.write("<H3><CENTER>نتمني لكم اطيب الاوقات</H3></CENTER>"); } </SCRIPT> </HEAD> <BODY onUnload="salut()"> <p align="center"></p> </body> </HTML>
نافذه توضيحية تكتب فيها الى تريده
<html> <HEAD> <TITLE></TITLE> <SCRIPT Language='JavaScript'> function winopen () { msg=open("","NewWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=260"); msg.document.write("<HEAD><TITLE>سهران</TITLE></HEAD>"); msg.document.write("<CENTER><h3><B>مرحبا بك في موقع سهران</B></h3></CENTER>"); } </SCRIPT> <body bgcolor="White" text="Black" link="Blue" vlink="Blue" alink="Blue"> <center><b>مرر الماوس <a href="" onMouseOver="winopen(); return true;">هنا</a> وسوف تنفتح نافذة</b></center> </BODY> </HTML>
زر متغير الحجم
<SCRIPT LANGUAGE="JavaScript"> <!-- begin // please help yourself to this code. var startTime =null; var timerID =null; var initial =new Date(); var pos =0; var menuItem =null; function initArray() { this.length = initArray.arguments.length for (var i = 0; i < this.length; i++) { this[i+1] = initArray.arguments[i] } } function parsemenuItem(data,num) { for(var i=0;i<data.length;i++) { if(data.substring(i,i+1)=="|") break; } if (num==0) return(data.substring(0,i)); else return(data.substring(i+1,data.length)); } function startTimer() { initial = new Date(); startTime=initial.getTime(); stopTimer(); menuItem = new initArray("uaezayed|http://www.sahran.4mg.com", "hotmail|http://www.hotmail.com", "alsaha|http://www.alsaha.com", "yahoo|http://www.yahoo.com", "Email|mailto:sahran90@hotmail.com" ); showTimer(); } function stopTimer() { timerID=null; menuItem=null; //clearTimeout(timerID); } function showTimer() { pos= (pos == menuItem.length) ? 1 : pos + 1; document.forms[0].elements[0].value=parsemenuItem(menuItem[pos],0); timerID=window.setTimeout('showTimer()',1000); } function goToUrl() { //parent.welcome.location=parsemenuItem(menuItem[pos],1); this.location=parsemenuItem(menuItem[pos],1); return (false); } // end --> </SCRIPT> <BODY onLoad="window.startTimer()"> <CENTER><FORM> <INPUT TYPE="button" VALUE=" WHERE TO? " NAME="goTo" onClick="window.goToUrl()"> </FORM></CENTER>