急!很简单的一个问题,可是我没办法。

984437 2002-01-24 12:59:48
请问在Microsoft InterDev里面,我有一幅图片,开始图片为A.gif,当Mouse移上去要图片要变为b.gif,当MOUSE移走,图片又要变为a.gif.运行总出错,要么说“不支持HREF操作”“要么说没对象”(用JAVASCRIPT时)
我的代码:
<img border="0"src="http://zhw/images/title1.GIF" width="770" height="105" style="WIDTH: 771px; HEIGHT: 117px" alt="" hspace=0 useMap="" id=IMG1 LANGUAGE=VBscript >

<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--

Sub IMG1_onmousemove
img1.href="http://zhw/images/HomeLogo.gif"
End Sub

Sub IMG1_onmouseover
img1.href="http://zhw/images/title1.GIF"
End Sub

-->
</SCRIPT>
...全文
83 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
keliangui 2002-01-24
  • 打赏
  • 举报
回复
用javascript写
<img border="0"src="http://zhw/images/title1.GIF" id=IMG1 onmouseover=IMG1.src="http://zhw/images/HomeLogo.gif" onmouseout=IMG1.src="http://zhw/images/title1.gif" >

zcflion 2002-01-24
  • 打赏
  • 举报
回复
用层来做啊!!

给你一个例子!

<html>
<head>
<title>防汛工情信息系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>
<style>
<!--
.stbtm {
BORDER-RIGHT: #665b8e 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #ffffff 1px solid; WIDTH: 40px; COLOR: #FFFFFF; BORDER-BOTTOM: #665b8e 1px solid; HEIGHT: 20px; BACKGROUND-COLOR: #0066CC; clip: rect( )}
.stedit {
BORDER-RIGHT: #4a3163 1px solid; BORDER-TOP: #4a3163 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #4a3163 1px solid; BORDER-BOTTOM: #4a3163 1px solid
; color: #003399; background-color: #FFFFFF}
.fanfan { font-size: 10pt; color: #003399}
-->
</style>
</head>
<SCRIPT language=JavaScript>

function changepw(){
window.open("chgpw.asp","","left=230,top=150,height=180,width=300,resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no");
}
function mapopen(){
window.open("/mapimage","","left=0,top=0,height=540,width=790,resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no");
}
function openwindows(url)
{
window.open(url,"","left=0,top=0,height=428,width=792,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,menubar=yes,location=yes");
}

</script>
<body bgcolor="#0066CC" onLoad="MM_showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','hide','Layer4','','hide','Layer5','','show')" leftmargin="0" topmargin="0">
<div id="Layer1" style="position:absolute; left:673; top:135; width:95; height:90; z-index:1; visibility: hidden"><img src="images/la001.jpg" width="95" height="90"></div>
<div id="Layer2" style="position:absolute; left:673; top:135; width:95; height:90; z-index:2; visibility: hidden"><img src="images/la002.jpg" width="95" height="90"></div>
<div id="Layer3" style="position:absolute; left:673; top:135; width:95; height:90; z-index:3; visibility: hidden"><img src="images/la003.jpg" width="95" height="90"></div>
<div id="Layer4" style="position:absolute; left:673; top:135; width:95; height:90; z-index:4; visibility: hidden"><img src="images/la004.jpg" width="95" height="90"></div>
<div id="Layer5" style="position:absolute; left:673px; top:135; width:95; height:90; z-index:5; visibility: hidden"><img src="images/la005.jpg" width="95" height="90"></div>


<table width="774" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<img src="images/logo.jpg" width="118" height="23">
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="774" height="281" align="center">
<tr>
<td> </td>
<td><img src="images/001.jpg" width="147" height="347"><img src="images/002.jpg" width="148" height="347"></td>
<td><img src="images/003.jpg" width="149" height="347"></td>
<td valign="top">
<table width="283" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="104"><img src="images/004.jpg" width="327" height="114"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="38">
<table width="327" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" height="95">
<tr>

<td width="197"><a href=javascript:mapopen() onMouseOver="MM_showHideLayers('Layer1','','show','Layer2','','hide','Layer3','','hide','Layer4','','hide')"><img src="images/icon001.gif" width="202" height="21" border="0"></a></td>

<td rowspan="5" width="119"> </td>
</tr>
<tr>


<td width="197"><a href=javascript:openwindows("insert/default.asp") onMouseOver="MM_showHideLayers('Layer1','','hide','Layer2','','show','Layer3','','hide','Layer4','','hide','Layer5','','hide')"><img src="images/icon002.gif" width="202" height="20" border="0"></a></td>


</tr>
<tr>


<td width="197"><a href=javascript:openwindows("update/default.asp") onMouseOver="MM_showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','show','Layer4','','hide','Layer5','','hide')"><img src="images/icon003.gif" width="202" height="18" border="0"></a></td>


</tr>
<tr>


<td width="197"><a href=javascript:openwindows("audit/default.asp") onMouseOver="MM_showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','hide','Layer4','','show','Layer5','','hide')"><img src="images/icon004.gif" width="202" height="17" border="0"></a></td>


</tr>
<tr>
<td height="15" width="197"><a href=javascript:openwindows("help.asp") onMouseOver="MM_showHideLayers('Layer1','','hide','Layer2','','hide','Layer3','','hide','Layer4','','hide','Layer5','','show')"><img src="images/icon005.gif" width="202" height="19" border="0"></a></td>
</tr>
</table>



</td>
</tr>

<tr>
<td height="110" bgcolor="#FFFFFF">
<table width="270" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="138">

<table width="240" border="0" cellspacing="0" cellpadding="2" align="right">
<tr bgcolor="#FFFFFF">

<font class="fanfan">您以用户名strong,成功登录。</font>
</tr>
<tr bgcolor="#FFFFFF" align="center"><font class="fanfan">
<a href=javascript:openwindows("jmb/default.asp")>简明表</font></a></font>
</tr>

<tr bgcolor="#FFFFFF">
<font class="fanfan">

<a href=javascript:openwindows("projectreg/index.asp")>工程注册</a>

</font>
</tr>
<tr bgcolor="#FFFFFF" align="center"><font class="fanfan">
<a href=javascript:openwindows("encnconn/encnconn.asp")>工程关联</a></font>
</tr>

</table>

</table>

</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="774" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="649" bgcolor="#0066CC" valign="top">
<br>
<br>
</td>
<td width="129" bgcolor="#0066CC">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="500" height="38" VIEWASTEXT>
<param name=movie value="images/water.swf">
<param name=quality value=high>
</object>
</td>
</tr>
</table>

</body>
</html>
希偌 2002-01-24
  • 打赏
  • 举报
回复
<img border="0"src="http://zhw/images/title1.GIF" width="770" height="105" style="WIDTH: 771px; HEIGHT: 117px" alt="" hspace=0 useMap="" id=IMG1 LANGUAGE=VBscript >

<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--

Sub IMG1_onmousemove
img1.src="http://zhw/images/HomeLogo.gif"
End Sub

Sub IMG1_onmouseover
img1.src="http://zhw/images/title1.GIF"
End Sub

-->
</SCRIPT>

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧