קבלו: שם: קבלו שלום יפה
קוד: <script language="javascript">
a = prompt("איך קוראים לך","")
</script>
<script>
document.write(" שלום לך"+a)
</script>
שם: חשבו את גילכם בגיל של כלב
קוד: <b>?רוצה לדעת את גילך בגיל כלב</b>
<FORM>
<SCRIPT LANGUAGE="javaScript">
//הסקריפט תורגם מהאתר javascriptkit.com
function fido (form){
form.dogyears.value = form.humanyears.value * 7
}
</SCRIPT>
<TABLE>
<TR><TD>:הקלד את גילך</TD><TD><INPUT TYPE ="text" NAME="humanyears" SIZE=15></TD></TR>
<TR><TD><INPUT TYPE ="button" VALUE="חשב" ONCLICK="fido(this.form)"></TD></TR>
<TR><TD>:גילך בגיל כלב הוא</TD><TD><INPUT TYPE="text" NAME="dogyears" SIZE=15></TD></TR>
</TABLE>
</FORM>
</script>
שם: סיסמא רנדומלית
קוד: <script>
var keylist="abcdefghijklmnopqrstuvwxyz123456789"
var temp=''
function generatepass(plength){
temp=''
for (i=0;i<plength;i++)
temp+=keylist.charAt(Math.floor(Math.random()*keylist.length))
return temp
}
function populateform(enterlength){
document.pgenerate.output.value=generatepass(enterlength)
}
</script>
<form name="pgenerate">
<input type="text" size=18 name="output">
<input type="button" value="לחץ כאן לסיסמה" onClick="populateform(this.form.thelength.value)"><br>
<b>מספר התוים בסיסמה:</b> <input type="text" name="thelength" size=3 value="7">
</form>
שם:הוספה למעודפים (יש שנות את http://www.yoursite.com לכתובת הרצויה וגם את את Title
קוד: <script language="JavaScript1.2">
<!--
var bookmarkurl="http://www.yoursite.com"
var bookmarktitle="Title"
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
-->
</script>
<a href=javascript:addbookmark()>הוסף את האתר למועדפים</a>
שם:בדיקת רזולוציה של הגולש
קוד: <script language="JavaScript">
<!--
function ResolutionCheck() {
alert(screen.width+"x"+screen.height+": הרזולוציה שלך היא")
}
//-->
</script>
שם: שינוי שורת הסטאטוס באר (יש לשנות את השורה status-bar לשורה הרצויה)
קוד: <script>
window.status= "status-bar"
</script>
שם: סקריפט מצב אונליין / אופליין באיי סי קיו (יש להחליף את המספר 000000000 במספר הרצוי)
קוד: <img src=http://wwp.icq.com/scripts/online.dll?icq=000000000&img=2>
שם: הדפסת עמוד
קוד: <a href=javascript:print()>הדפסה</a>
שם: מזהה את הזולוציה שלך. (שימו את הסקריפט בHead).
קוד: <script language="JavaScript1.2">
var correctwidth=800
var correctheight=600
if (screen.width!=correctwidth||screen.height!=correctheight)
alert(" "+correctwidth+"*"+correctheight+" הדף נצפה בצורה מעולה ברזולוציה \n"+" הרזולוציה שלך היא : " + screen.width+"*"+screen.height)
//-->
</script>
שם: בשביל לבטל את הסקרולר (שימו את זה בBody איפה שהBgcolor).
קוד: SCROLL="NO"
שם: מחשבון (שימו את הקוד בBody).
קוד: <table border="2" width="200" cellspacing="0" cellpadding="0" bgcolor="#000000"
style="border-color:black" onClick="previouskey=event.srcElement.innerText">
<tr>
<td width="100%" bgcolor="#FFFFFF" id="result"
style="font:bold 20px Verdana;color:black;text-align='right'">0</td>
</tr>
<tr>
<td width="100%" valign="middle" align="center"><table border="0" width="100%"
cellspacing="0" cellpadding="0" style="font:bold 20px Verdana;color:white">
<tr>
<td width="80%" align="center"><table border="1" width="100%" cellspacing="0"
cellpadding="0" style="cursor:hand;font:bold 20px Verdana;color:white"
onMouseover="if (event.srcElement.tagName=='TD')event.srcElement.style.color='yellow'"
onMouseout="event.srcElement.style.color='white'" onselectStart="return false"
onClick="calculate()" height="82">
<tr>
<td width="25%" align="center" height="17">7</td>
<td width="25%" align="center" height="17">8</td>
<td width="25%" align="center" height="17">9</td>
<td width="25%" align="center" height="17">/</td>
</tr>
<tr>
<td width="25%" align="center" height="19">4</td>
<td width="25%" align="center" height="19">5</td>
<td width="25%" align="center" height="19">6</td>
<td width="25%" align="center" height="19">*</td>
</tr>
<tr>
<td width="25%" align="center" height="19">1</td>
<td width="25%" align="center" height="19">2</td>
<td width="25%" align="center" height="19">3</td>
<td width="25%" align="center" height="19">-</td>
</tr>
<tr>
<td width="25%" align="center" height="19">0</td>
<td width="25%" align="center" height="19"
onClick="pn();previouskey=1;event.cancelBubble=true">+/-</td>
<td width="25%" align="center" height="19">.</td>
<td width="25%" align="center" height="19">+</td>
</tr>
</table>
</td>
<td width="20%"><div align="left"><table border="1" width="100%" cellspacing="0"
cellpadding="0">
<tr>
<td width="100%" style="cursor:hand;font:bold 20px Verdana;color:white;text-align:center"
onClick="result.innerText=0;results=''">C</td>
</tr>
</table>
</div><div align="left"><table border="1" width="100%" cellspacing="0" cellpadding="0"
height="81">
<tr>
<td width="100%" style="cursor:hand;font:bold 32px Verdana;color:white;text-align:center"
onMouseover="event.srcElement.style.color='yellow'"
onMouseout="event.srcElement.style.color='white'" onClick="calculateresult()">=</td>
</tr>
</table>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
<script language="JavaScript1.2">
/*
DHTML Calculator Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
var results=''
var previouskey=''
var re=/(\/|\*|\+|-)/
var re2=/(\/|\*|\+|-){2}$/
var re3=/.+(\/|\*|\+|-).+/
var re4=/\d|\./
var re5=/^.+\d$/
var re6=/\./
function calculate(){
if (event.srcElement.tagName=="TD"){
if (event.srcElement.innerText.match(re4)&&previouskey=="=")
results=''
if (result.innerText.match(re3)&&event.srcElement.innerText.match(re)){
if (!results.match(re5)){
result.innerText="Error!"
return
}
results=eval(results)
if (results.toString().length>=12&&results.toString().match(re6))
results=results.toString().substring(0,12)
result.innerText=results
}
results+=event.srcElement.innerText
if (results.match(re2))
results=results.substring(0,results.length-2)+results.charAt(results.length-1)
result.innerText=results
}
}
function calculateresult(){
if (!results.match(re5)){
result.innerText="Error!"
return
}
results=eval(results)
if (results.toString().length>=12&&results.toString().match(re6))
results=results.toString().substring(0,12)
result.innerText=results
}
function pn(){
if (result.innerText.charAt(0)!='-')
result.innerText=results='-'+result.innerText
else if (result.innerText.charAt(0)=='-')
result.innerText=results=result.innerText*(-1)
}
</script>
שם: הסקריפט הזה ישאל את שמך, יזכור אותו ויברך אותך בכניסתך הבאה. (לשים בBody)
קוד: <script>
<!--
// Copyright (c) 1996-1997 Tomer Shiran. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.geocities.com/~yehuda/
// Boolean variable specified if alert should be displayed if cookie exceeds 4KB
var caution = false
// name - name of the cookie
// value - value of the cookie
// - expiration date of the cookie (defaults to end of current session)
// - path for which the cookie is valid (defaults to path of calling document)
// - domain for which the cookie is valid (defaults to domain of calling document)
// - Boolean value indicating if the cookie transmission requires a secure transmission
// * an argument defaults when it is assigned null as a placeholder
// * a null placeholder is not required for trailing omitted arguments
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "")
if (!caution || (name + "=" + escape(value)).length <= 4000)
document.cookie = curCookie
else
if (confirm("Cookie exceeds 4KB and will be cut!"))
document.cookie = curCookie
}
// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist
function getCookie(name) {
var prefix = name + "="
var cookieStartIndex = document.cookie.indexOf(prefix)
if (cookieStartIndex == -1)
return null
var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
if (cookieEndIndex == -1)
cookieEndIndex = document.cookie.length
return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}
// name - name of the cookie
// - path of the cookie (must be same as path used to create cookie)
// - domain of the cookie (must be same as domain used to create cookie)
// * path and domain default if assigned null or omitted if no explicit argument proceeds
function deleteCookie(name, path, domain) {
if (getCookie(name)) {
document.cookie = name + "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
"; expires=Thu, 01-Jan-70 00:00:01 GMT"
}
}
// date - any instance of the Date object
// * you should hand all instances of the Date object to this function for "repairs"
// * this function is taken from Chapter 14, "Time and Date in JavaScript", in "Learn Advanced JavaScript Programming"
function fixDate(date) {
var base = new Date(0)
var skew = base.getTime()
if (skew > 0)
date.setTime(date.getTime() - skew)
}
var now = new Date()
fixDate(now)
now.setTime(now.getTime() + 31 * 24 * 60 * 60 * 1000)
var name = getCookie("name")
if (!name)
name = prompt("Please enter your name:", "John Doe")
setCookie("name", name, now)
document.write("Hello " + name + "!")
//-->
</script>
שם: הצג מקור לדף (לשים בBody).
קוד: <FORM><INPUT TYPE=button NAME="view" VALUE="View Source Code " OnClick='window.location="view-source:" +window.location.href'></FORM>
שם: להוריד גשם על הדף שלכם (לשים בBody).
קוד: <SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var no = 50;
var speed = 1;
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var s, x, y, sn, cs;
var a, r, cx, cy;
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
else
if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
x = new Array();
y = new Array();
r = new Array();
cx = new Array();
cy = new Array();
s = 8;
for (i = 0; i < no; ++ i) {
initRain();
if (ns4up) {
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"blue\">");
document.write(",</font></layer>");
}
else {
document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"blue\">");
document.write(",</font></layer>");
}
}
else
if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"blue\">");
document.write(",</font></div>");
}
else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"blue\">");
document.write(",</font></div>");
}
}
}
function initRain() {
a = 6;
r = 1;
sn = Math.sin(a);
cs = Math.cos(a);
cx = Math.random() * doc_width + 1;
cy = Math.random() * doc_height + 1;
x = r * sn + cx;
y = cy;
}
function makeRain() {
r = 1;
cx = Math.random() * doc_width + 1;
cy = 1;
x = r * sn + cx;
y = r * cs + cy;
}
function updateRain() {
r += s;
x = r * sn + cx;
y = r * cs + cy;
}
function raindropNS() {
for (i = 0; i < no; ++ i) {
updateRain();
if ((x <= 1) || (x >= (doc_width - 20)) || (y >= (doc_height - 20))) {
makeRain();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
document.layers.top = y;
document.layers.left = x;
}
setTimeout("raindropNS()", speed);
}
function raindropIE() {
for (i = 0; i < no; ++ i) {
updateRain();
if ((x <= 1) || (x >= (doc_width - 20)) || (y >= (doc_height - 20))) {
makeRain();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
document.all.style.pixelTop = y;
document.all.style.pixelLeft = x;
}
setTimeout("raindropIE()", speed);
}
if (ns4up) {
raindropNS();
}
else
if (ie4up) {
raindropIE();
}
// End -->
</script>
זהו !
קרדיט: אין לי חברר שלי נתן לי !
בברכה ddorr