This article describes the method of JS to turn mouse arrows into a burning candlelight effect. Share it for your reference. The details are as follows:
This is a JS code that completely beautifies the effect of mouse arrows. Through this JS code, add the mouse arrows to a style to burn the candle. This is also very old code, and can only be run in IE8 and below browsers, the code is as follows:
Copy the code as follows: <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Very distinctive fluorescent mouse</title>
</head>
<body id="mybody" style="filter:light(enabled=1);" bgcolor="#ffffff" text="#000000">
<div id="Layer1" style="height: 32; left: 66; position: absolute; top: 41; width: 52">
<dd>
<div align="right">
<img src="images/light.gif">
</div>
</dd>
</div>
<table>
<tr>
<td><font face="宋体" color="#FF00FF" style="font-size: 9pt">
</font><span style="font-size: 9pt">
Abstract: HTML5 source code, Canvas instance, Canvas animation
An HTML5_Canvas practice program, use the Canvas tag to draw simple animation effects: simulate the green light at the intersection, the car goes; the red light is on, the car stops the car, and the animation effect is relatively rough, for reference by beginners. HTML5 programs do not support IE at present.
<br> Shooting game, after starting the game, <br>Click the falling object with the mouse, and can shoot explosive objects. The generated game is of fine quality and smooth animation. Please use Firefox or Chrome browser for testing. <br>The following versions of IE8 cannot run this game. <br>Although the game functions are not powerful, it uses basic skills in HTML5. <br><br><br>In addition, some game-operated JS classes also want to be good choices. <br><br>
Based on the html5 offline storage instance, when loading the page, the application uses an onLoad function to verify whether the corresponding data is already in the local cache area and will add a welcome window, add an event listener to <br><br> and listen to a storage event. The application can respond to localStorage changes, and verify that the browser supports localStorage function, set data to cache, clear data, and other functions.
</span></td>
</tr>
</table>
<script language="vbscript">
dim red,gre,blu
dim x,y,z
red=255
gre=255
blu=0
z=100
sub window_onload()
call mybody.filters.light.addPoint(0,0,z,Red,Gre,Blu,100)
mybody.style.cursor="hand"
end sub
sub document_onmousemove()
x=window.event.x
y=window.event.y
call mybody.filters.Light.MoveLight(0, x, y, 100, 1)
end sub
</script>
<script language="javascript">
//This is a function to move the layer
function move_layer()
{
Layer1.style.left=event.clientX+document.body.scrollLeft-50;
Layer1.style.top=event.clientY+document.body.scrollTop-20;
}
//What we mean here is that if the mouse moves, the "move_layer" function is called.
document.onmousemove =move_layer;
</script>
</body>
</html>
I hope this article will be helpful to everyone's JavaScript programming.