|
چند اسکریپت
مفید جاوا
باز شدن یک پنجره جدید
<script
language="JavaScript" for="window" event="onload()">
<!--
window.open("http://www.bahalnews.persianblog.com.com", "vb", "scrollbars,resizable,height=300,width=450")
//-->
</script>
نمایش یک متن در نوار وضعیت
<script
language="www.bahalnews.persianblog.com">
<!--
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com
var text = "this is the bubble banner"
var speed = 200
var x = 0
function bb() {
var a = text.substring(0,x)
var b = text.substring(x,x+1).toUpperCase()
var c = text.substring(x+1,text.length)
window.status = a + b + c
if (x == text.length) {
x = 0
}
else {
x++
}
setTimeout("bb()",speed)
}
bb();
//-->
</script>
Scroll
رنگین کردن
<style>
BODY { scrollbar-3d-light-color:#d2e6f8;
scrollbar-arrow-color:#ff0000;
scrollbar-base-color:ffffff;
scrollbar-dark-shadow-color:#000000;
scrollbar-face-color:#BDE9FF;
scrollbar-highlight-color:#0000ff;
scrollbar-shadow-color:#000000}
</style>
از کار انداختن راست کلیک با اخطار
<script
language="JavaScript">
<!--
// No rightclick script v.2.5
// (c) 1998 barts1000
// barts1000@aol.com
// Don't delete this header!
var message="Sorry, that function is disabled.\nThis Page Copyrighted and\nImages
and Text protected!\nALL RIGHTS RESERVED";
// Don't edit below!
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->
</script>
از کار انداختن راست کلیک بدون اخطار
<script
language=JavaScript>
function clickIE() {
if (document.all) {
return false;
}
}
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;
}
else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
</script>
|