你这个要用JavaScript实现,我帮你修改如下 <html> <head><title>我的主页</title></head> <body bgcolor="red"> <h2>hello world</h2><hr> <img src="myphoto.gif" id=myphoto> <form name="form1"> <script language="vbscript"> Sub Form1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) document.all.myphoto.x=X document.all.myphoto.y=Y end sub </script> </form> </body> </html>
<html>
<head><title>我的主页</title></head>
<body bgcolor="red">
<h2>hello world</h2><hr>
<img src="myphoto.gif" id=myphoto>
<form name="form1">
<script language="vbscript">
Sub Form1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
document.all.myphoto.x=X
document.all.myphoto.y=Y
end sub </script>
</form>
</body>
</html>