เข้าสู่ระบบ(Log in)
FaceBook Fan-page
Latest topics
Similar topics
ทำเส้นตัดกันตาม MOUSE
หน้า 1 จาก 1
ทำเส้นตัดกันตาม MOUSE
นำ CODE ด้านล่างไปไว้ที่ <head> ครับ
นำ CODE ด้านล่างไปไว้ที่ <body> ครับ
- Code:
<style>
<!--
#leftright, #topdown{
position:absolute;
left:0;
top:0;
width:1px;
height:1px;
layer-background-color:red;
background-color:red;
z-index:100;
font-size:1px;
}
-->
</style>
นำ CODE ด้านล่างไปไว้ที่ <body> ครับ
- Code:
<div id="leftright" style="width:expression(document.body.clientWidth-2)"></div>
<div id="topdown" style="height:expression(document.body.clientHeight-2)"></div>
<script language="JavaScript1.2">
<!--
if (document.all&&!window.print){
//if the user is using IE 4 (but NOT IE 5. We used dynamic expressions in IE 5 to replace the below code)
leftright.style.width=document.body.clientWidth-2
topdown.style.height=document.body.clientHeight-2
}
else if (document.layers){
document.leftright.clip.width=window.innerWidth
document.leftright.clip.height=1
document.topdown.clip.width=1
document.topdown.clip.height=window.innerHeight
}
function followmouse1(){
//move cross engine for IE 4+
leftright.style.pixelTop=document.body.scrollTop+event.clientY+1
topdown.style.pixelTop=document.body.scrollTop
if (event.clientX<document.body.clientWidth-2)
topdown.style.pixelLeft=document.body.scrollLeft+event.clientX+1
else
topdown.style.pixelLeft=document.body.clientWidth-2
}
function followmouse2(e){
//move cross engine for NS 4+
document.leftright.top=e.y+1
document.topdown.top=pageYOffset
document.topdown.left=e.x+1
}
if (document.all)
document.onmousemove=followmouse1
else if (document.layers){
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=followmouse2
}
//entire code below simply refreshes the page when a surfer reloads the page, to reposition the crosshair. Irrelevant in IE 5
function regenerate(){
window.location.reload()
}
function regenerate2(){
setTimeout("window.onresize=regenerate",400)
}
if ((document.all&&!window.print)||document.layers)
//if the user is using IE 4 or NS 4, both NOT IE 5+
window.onload=regenerate2
//-->
</script>
Smilez- จอมพลปราชญ์
- จำนวนข้อความ : 985
: 34
คะแนน : 1234
ชื่อเสียง : 68
Registration date : 28/04/2009
Similar topics
» คลิ๊ก MOUSE ขวา แล้วมี MENU ที่นำ MOUSE ไปวางแล้ว
» มีรูป CURSOR ของ MOUSE มาวิ่งตาม MOUSE มีเงา
» มีผึ้งมาบินวนรอบๆ MOUSE
» มีรูป CURSOR ของ MOUSE มาวิ่งตาม MOUSE มีเงา
» มีผึ้งมาบินวนรอบๆ MOUSE
หน้า 1 จาก 1
Permissions in this forum:
คุณไม่สามารถพิมพ์ตอบ
Tue Feb 11, 2020 7:42 pm by XyzGame
» Ran Top เซิฟEP9 เปิดวันศุกร์ที่ 8 พ.ย. 62 เวลา 18.00 น.
Sun Nov 10, 2019 5:23 pm by XyzGame
» Ran Top เซิฟEP9 เปิดวันศุกร์ที่ 8 พ.ย. 62 เวลา 18.00 น.
Sun Nov 10, 2019 5:22 pm by XyzGame
» Ran Aki เซิฟEP9 7อาชีพ +11 เวลตัน250 เปิดยาว มั่นคง คนเล่นเพียบ
Mon Sep 09, 2019 12:33 pm by XyzGame
» Ran Aki เซิฟEP9 7อาชีพ +11 เวลตัน250 เปิดยาว มั่นคง คนเล่นเพียบ
Mon Sep 09, 2019 12:31 pm by XyzGame
» ◤【卐】✿✿ RAN-FROST EP 12 อัพเดลอาวุธไอน้ำ ชุด290อัพเดลแฟชั่น Avenger engame ✿✿【卐】◥
Mon Jul 22, 2019 10:19 pm by aowmygod
» RAN-ZOOMMER EP 12 9 อาชีพ อาวุธสูงสุดมังกรฟ้าชุดสูงสุด 290 เปิดยาว
Sat May 25, 2019 9:24 pm by aowmygod
» ◤【卐】✿✿ RAN-OBZ EP 11 9 อาชีพ สูงสุด+15 ไอเท็มใหม่ล่าสุด สมดุล อัพเดลตลอด ✿✿【卐】◥
Wed Apr 24, 2019 5:15 pm by aowmygod
» ◤【卐】✿✿ RAN-COOKIE EP 11 สูงสุด+15 ออโต้สกิล จบวอร์วาปแมพบอสพิเศษ มังกรทอง ✿✿【卐】◥
Sun Apr 07, 2019 5:25 pm by aowmygod